{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "/* 本电子讲义使用之CSS */\n",
       "div.code_cell {\n",
       "    background-color: #e5f1fe;\n",
       "}\n",
       "div.cell.selected {\n",
       "    background-color: #effee2;\n",
       "    font-size: 2rem;\n",
       "    line-height: 2.4rem;\n",
       "}\n",
       "div.cell.selected .rendered_html table {\n",
       "    font-size: 2rem !important;\n",
       "    line-height: 2.4rem !important;\n",
       "}\n",
       ".rendered_html pre code {\n",
       "    background-color: #C4E4ff;   \n",
       "    padding: 2px 25px;\n",
       "}\n",
       ".rendered_html pre {\n",
       "    background-color: #99c9ff;\n",
       "}\n",
       "div.code_cell .CodeMirror {\n",
       "    font-size: 2rem !important;\n",
       "    line-height: 2.4rem !important;\n",
       "}\n",
       ".rendered_html img, .rendered_html svg {\n",
       "    max-width: 100%;\n",
       "    height: auto;\n",
       "    float: center;\n",
       "}\n",
       "/* Gradient transparent - color - transparent */\n",
       "hr {\n",
       "    border: 0;\n",
       "    border-bottom: 1px dashed #ccc;\n",
       "}\n",
       ".emoticon{\n",
       "    font-size: 5rem;\n",
       "    line-height: 4.4rem;\n",
       "    text-align: center;\n",
       "    vertical-align: middle;\n",
       "}\n",
       "\n",
       "</style>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%html\n",
    "<style>\n",
    "/* 本电子讲义使用之CSS */\n",
    "div.code_cell {\n",
    "    background-color: #e5f1fe;\n",
    "}\n",
    "div.cell.selected {\n",
    "    background-color: #effee2;\n",
    "    font-size: 2rem;\n",
    "    line-height: 2.4rem;\n",
    "}\n",
    "div.cell.selected .rendered_html table {\n",
    "    font-size: 2rem !important;\n",
    "    line-height: 2.4rem !important;\n",
    "}\n",
    ".rendered_html pre code {\n",
    "    background-color: #C4E4ff;   \n",
    "    padding: 2px 25px;\n",
    "}\n",
    ".rendered_html pre {\n",
    "    background-color: #99c9ff;\n",
    "}\n",
    "div.code_cell .CodeMirror {\n",
    "    font-size: 2rem !important;\n",
    "    line-height: 2.4rem !important;\n",
    "}\n",
    ".rendered_html img, .rendered_html svg {\n",
    "    max-width: 100%;\n",
    "    height: auto;\n",
    "    float: center;\n",
    "}\n",
    "/* Gradient transparent - color - transparent */\n",
    "hr {\n",
    "    border: 0;\n",
    "    border-bottom: 1px dashed #ccc;\n",
    "}\n",
    ".emoticon{\n",
    "    font-size: 5rem;\n",
    "    line-height: 4.4rem;\n",
    "    text-align: center;\n",
    "    vertical-align: middle;\n",
    "}\n",
    "\n",
    "</style>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "key_hong =\"ee65e7d3e692cbfb9b04687337b72a7d\"# 设定好我的key"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 地理编码思考总结\n",
    "\n",
    "1. 地理编码将详细的结构化地址转换为高德经纬度坐标。且支持对地标性名胜景区、建筑物名称解析为高德经纬度坐标。\n",
    "\n",
    "2. 逆地理编码将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息。\n",
    "\n",
    "3. 这应该是运用了machine learning中的关键搜索，通过机器学习，将用户提供的关键字与数据比对，最后返回结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 获取地理编码\n",
    "#### 封装函数后，试传入一个地址作为参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区中山大学南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.679287,23.632575',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-1 地理编码\n",
    "def geocode(address,city=None)->dict:\n",
    "    \"\"\"获取地理编码\"\"\"\n",
    "    url = 'https://restapi.amap.com/v3/geocode/geo?parameters'\n",
    "    params={\n",
    "        'key': key_hong,# 已设定\n",
    "        'address':address,# 后期传入\n",
    "        'city':city,# 可选\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "# 将地理编码获取封装成函数\n",
    "中大南方 = geocode(address='广东省广州市从化区中山大学南方学院')\n",
    "中大南方"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市天河区广东金融学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '天河区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440106',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.380722,23.202524',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广金 = geocode(address='广东省广州市天河区广东金融学院')\n",
    "广金"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 可以看出print的显示效果没有层级\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'info': 'OK', 'infocode': '10000', 'count': '1', 'geocodes': [{'formatted_address': '广东省广州市从化区中山大学南方学院', 'country': '中国', 'province': '广东省', 'citycode': '020', 'city': '广州市', 'district': '从化区', 'township': [], 'neighborhood': {'name': [], 'type': []}, 'building': {'name': [], 'type': []}, 'adcode': '440117', 'street': [], 'number': [], 'location': '113.679287,23.632575', 'level': '兴趣点'}]}\n"
     ]
    }
   ],
   "source": [
    "中大南方 = geocode(address='广东省广州市从化区中山大学南方学院')\n",
    "print(中大南方)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 只显示地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "广金地理编码 113.380722,23.202524\n"
     ]
    }
   ],
   "source": [
    "广金地理编码=广金['geocodes'][0]['location']\n",
    "print (\"广金地理编码\",广金地理编码)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "中大南方地理编码 113.679287,23.632575\n"
     ]
    }
   ],
   "source": [
    "中大南方地理编码=中大南方['geocodes'][0]['location']\n",
    "print(\"中大南方地理编码\",中大南方地理编码)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 以表格的形式输出地理编码获取到的内容"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>building.name</th>\n",
       "      <th>building.type</th>\n",
       "      <th>city</th>\n",
       "      <th>citycode</th>\n",
       "      <th>country</th>\n",
       "      <th>district</th>\n",
       "      <th>formatted_address</th>\n",
       "      <th>level</th>\n",
       "      <th>location</th>\n",
       "      <th>neighborhood.name</th>\n",
       "      <th>neighborhood.type</th>\n",
       "      <th>number</th>\n",
       "      <th>province</th>\n",
       "      <th>street</th>\n",
       "      <th>township</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>440117</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>广州市</td>\n",
       "      <td>020</td>\n",
       "      <td>中国</td>\n",
       "      <td>从化区</td>\n",
       "      <td>广东省广州市从化区中山大学南方学院</td>\n",
       "      <td>兴趣点</td>\n",
       "      <td>113.679287,23.632575</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   adcode building.name building.type city citycode country district  \\\n",
       "0  440117            []            []  广州市      020      中国      从化区   \n",
       "\n",
       "   formatted_address level              location neighborhood.name  \\\n",
       "0  广东省广州市从化区中山大学南方学院   兴趣点  113.679287,23.632575                []   \n",
       "\n",
       "  neighborhood.type number province street township  \n",
       "0                []     []      广东省     []       []  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_中大南方地理编码 = pd.io.json.json_normalize(中大南方['geocodes'])\n",
    "display(df_中大南方地理编码)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 获取逆地理编码\n",
    "#### 将获取你地理编码的代码封装成函数，将原有定义的中大南方地理编码传入，试图获取逆地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'regeocode': {'addressComponent': {'city': '广州市', 'province': '广东省', 'adcode': '440117', 'district': '从化区', 'towncode': '440117103000', 'streetNumber': {'number': '7号', 'location': '113.6786,23.6333289', 'direction': '西北', 'distance': '109.203', 'street': '博学路'}, 'country': '中国', 'township': '温泉镇', 'businessAreas': [[]], 'building': {'name': [], 'type': []}, 'neighborhood': {'name': [], 'type': []}, 'citycode': '020'}, 'formatted_address': '广东省广州市从化区温泉镇中山大学南方学院'}, 'info': 'OK', 'infocode': '10000'}\n"
     ]
    }
   ],
   "source": [
    "# A-1 地理编码\n",
    "def regeocode(location,poitype=None,radius=None,extensions=\"base\",batch=False,roadlevel=None,sig=None,homeorcorp=None)->dict:\n",
    "    \"\"\"获取逆地理编码\"\"\"\n",
    "    url = 'https://restapi.amap.com/v3/geocode/regeo?parameters'\n",
    "    params={\n",
    "        'key': key_hong,# 已设定\n",
    "        'location':location,\n",
    "        'poitype':poitype,\n",
    "        'radius':radius,\n",
    "        'extensions':extensions,\n",
    "        'batch':batch,\n",
    "        'roadlevel':roadlevel,\n",
    "        'homeorcorp':homeorcorp,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "# 将逆地理编码获取封装成函数\n",
    "中大南方逆地理编码_base = regeocode(中大南方地理编码)\n",
    "print(中大南方逆地理编码_base)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 将逆地理编码以层级关系呈现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117103000',\n",
       "   'streetNumber': {'number': '7号',\n",
       "    'location': '113.6786,23.6333289',\n",
       "    'direction': '西北',\n",
       "    'distance': '109.203',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇中山大学南方学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "中大南方 = regeocode(location='113.679287,23.632575')\n",
    "中大南方"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 以表格的形式输出逆地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>info</th>\n",
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>infocode</th>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.adcode</th>\n",
       "      <td>440117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.businessAreas</th>\n",
       "      <td>[[]]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.city</th>\n",
       "      <td>广州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.citycode</th>\n",
       "      <td>020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.country</th>\n",
       "      <td>中国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.district</th>\n",
       "      <td>从化区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.province</th>\n",
       "      <td>广东省</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.direction</th>\n",
       "      <td>西北</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.distance</th>\n",
       "      <td>109.203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.location</th>\n",
       "      <td>113.6786,23.6333289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.number</th>\n",
       "      <td>7号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.street</th>\n",
       "      <td>博学路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.towncode</th>\n",
       "      <td>440117103000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.township</th>\n",
       "      <td>温泉镇</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.formatted_address</th>\n",
       "      <td>广东省广州市从化区温泉镇中山大学南方学院</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>status</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                      0\n",
       "info                                                                 OK\n",
       "infocode                                                          10000\n",
       "regeocode.addressComponent.adcode                                440117\n",
       "regeocode.addressComponent.building.name                             []\n",
       "regeocode.addressComponent.building.type                             []\n",
       "regeocode.addressComponent.businessAreas                           [[]]\n",
       "regeocode.addressComponent.city                                     广州市\n",
       "regeocode.addressComponent.citycode                                 020\n",
       "regeocode.addressComponent.country                                   中国\n",
       "regeocode.addressComponent.district                                 从化区\n",
       "regeocode.addressComponent.neighborhood.name                         []\n",
       "regeocode.addressComponent.neighborhood.type                         []\n",
       "regeocode.addressComponent.province                                 广东省\n",
       "regeocode.addressComponent.streetNumber.direction                    西北\n",
       "regeocode.addressComponent.streetNumber.distance                109.203\n",
       "regeocode.addressComponent.streetNumber.location    113.6786,23.6333289\n",
       "regeocode.addressComponent.streetNumber.number                       7号\n",
       "regeocode.addressComponent.streetNumber.street                      博学路\n",
       "regeocode.addressComponent.towncode                        440117103000\n",
       "regeocode.addressComponent.township                                 温泉镇\n",
       "regeocode.formatted_address                        广东省广州市从化区温泉镇中山大学南方学院\n",
       "status                                                                1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_中大南方逆地理编码 = pd.io.json.json_normalize(中大南方).T\n",
    "display(df_中大南方逆地理编码)\n",
    "# .T能输出竖版的表格，看起来更舒服"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 显示更多的逆地理编码信息（all）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'regeocode': {'roads': [{'id': '020F49F0050461203', 'location': '113.68,23.634', 'direction': '南', 'name': '博学路', 'distance': '156.951'}, {'id': '020F49F0050462451', 'location': '113.677,23.6347', 'direction': '东南', 'name': '中山路', 'distance': '343.951'}, {'id': '020F49F006047765', 'location': '113.682,23.6394', 'direction': '南', 'name': 'S29从莞深高速', 'distance': '807.947'}], 'roadinters': [{'second_name': '中山路', 'first_id': '020F49F0050461203', 'second_id': '020F49F0050462451', 'location': '113.6767944,23.63466139', 'distance': '343.951', 'first_name': '博学路', 'direction': '东南'}], 'formatted_address': '广东省广州市从化区温泉镇中山大学南方学院', 'addressComponent': {'city': '广州市', 'province': '广东省', 'adcode': '440117', 'district': '从化区', 'towncode': '440117103000', 'streetNumber': {'number': '7号', 'location': '113.6786,23.6333289', 'direction': '西北', 'distance': '109.203', 'street': '博学路'}, 'country': '中国', 'township': '温泉镇', 'businessAreas': [[]], 'building': {'name': [], 'type': []}, 'neighborhood': {'name': [], 'type': []}, 'citycode': '020'}, 'aois': [{'area': '536585.849985', 'type': '141201', 'id': 'B00140MR9A', 'location': '113.679262,23.632583', 'adcode': '440117', 'name': '中山大学南方学院', 'distance': '0'}], 'pois': [{'id': 'B00140MR9A', 'direction': '西', 'businessarea': [], 'address': '温泉大道882号', 'poiweight': '0.450402', 'name': '中山大学南方学院', 'location': '113.679262,23.632583', 'distance': '2.69979', 'tel': '020-61787326;020-61787333', 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFF2VMJ4', 'direction': '东南', 'businessarea': [], 'address': '温泉大道886号中山大学南方学院内', 'poiweight': '0.148531', 'name': '中山大学南方学院-综合楼', 'location': '113.680117,23.631544', 'distance': '142.466', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B0FFFTC9PH', 'direction': '东北', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.193172', 'name': '中山大学南方学院教学楼10号', 'location': '113.680125,23.633492', 'distance': '132.988', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B00141TQKX', 'direction': '西北', 'businessarea': [], 'address': '温泉大道882', 'poiweight': '0.148531', 'name': '中山大学南方学院教学楼6号', 'location': '113.678424,23.633710', 'distance': '153.818', 'tel': [], 'type': '科教文化服务;学校;学校'}, {'id': 'B00141WQCO', 'direction': '东北', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.14954', 'name': '中山大学南方学院教学楼8号', 'location': '113.680399,23.634329', 'distance': '225.543', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B00141TRVH', 'direction': '西南', 'businessarea': [], 'address': '博学路21', 'poiweight': '0.148531', 'name': '中山大学南方学院教学楼2号', 'location': '113.677060,23.631346', 'distance': '264.846', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFKP9ET5', 'direction': '西南', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.191742', 'name': '中山大学南方学院1号实验楼', 'location': '113.678215,23.631370', 'distance': '172.86', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B00140TWHT', 'direction': '南', 'businessarea': [], 'address': '笃行路2', 'poiweight': '0.157653', 'name': '教工住宅1号', 'location': '113.678490,23.630432', 'distance': '251.758', 'tel': [], 'type': '商务住宅;住宅区;住宅小区'}, {'id': 'B0FFHC4XU0', 'direction': '南', 'businessarea': [], 'address': '温泉大道886号', 'poiweight': '0.158426', 'name': '中山大学南方学院学术交流中心', 'location': '113.679959,23.630496', 'distance': '241.095', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFLBEOND', 'direction': '东南', 'businessarea': [], 'address': [], 'poiweight': '0.190963', 'name': '聚贤楼10号', 'location': '113.681253,23.631036', 'distance': '263.444', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFHJFHVN', 'direction': '北', 'businessarea': [], 'address': '温泉镇温泉大道', 'poiweight': '0.210336', 'name': '中山大学南方学院第五食堂', 'location': '113.679234,23.634647', 'distance': '230.464', 'tel': [], 'type': '餐饮服务;中餐厅;中餐厅'}, {'id': 'B0FFJLW0O9', 'direction': '西', 'businessarea': [], 'address': '博学路4附近', 'poiweight': '0.191645', 'name': '中山大学南方学院西区饭堂', 'location': '113.676210,23.632177', 'distance': '316.572', 'tel': [], 'type': '科教文化服务;科教文化场所;科教文化场所'}, {'id': 'B0FFJBZLYT', 'direction': '西北', 'businessarea': [], 'address': '中山路与博学路交叉口东南50米', 'poiweight': '0.297382', 'name': '铜像广场', 'location': '113.676921,23.634555', 'distance': '326.444', 'tel': [], 'type': '风景名胜;风景名胜;风景名胜'}, {'id': 'B0FFG8CSEK', 'direction': '东', 'businessarea': [], 'address': '温泉镇', 'poiweight': '0.185371', 'name': 'L5员工宿舍', 'location': '113.682583,23.631487', 'distance': '356.923', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFKPXO2S', 'direction': '北', 'businessarea': [], 'address': '博学路附近', 'poiweight': '0.188247', 'name': '中山大学南方学院医务室', 'location': '113.679394,23.635924', 'distance': '372.556', 'tel': [], 'type': '医疗保健服务;医疗保健服务场所;医疗保健服务场所'}, {'id': 'B0FFHHLMF8', 'direction': '东北', 'businessarea': [], 'address': '中山大学南方学院明辩路2号第三饭堂', 'poiweight': '0.178935', 'name': '茗语轩餐厅', 'location': '113.681901,23.634495', 'distance': '341.332', 'tel': '13929501395', 'type': '餐饮服务;中餐厅;中餐厅'}, {'id': 'B0FFGXGN3K', 'direction': '东', 'businessarea': [], 'address': [], 'poiweight': '0.188657', 'name': '中山大学南方学院宿舍H25', 'location': '113.683474,23.632020', 'distance': '430.984', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFGQ2UG9', 'direction': '东', 'businessarea': [], 'address': '温泉镇', 'poiweight': '0.189884', 'name': 'H23学生宿舍楼', 'location': '113.684021,23.633311', 'distance': '489.185', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFGBBC19', 'direction': '东', 'businessarea': [], 'address': '温泉镇', 'poiweight': '0.2587', 'name': '保利桃花源', 'location': '113.685212,23.633333', 'distance': '609.461', 'tel': '020-37918888', 'type': '商务住宅;住宅区;别墅'}, {'id': 'B00140U844', 'direction': '西南', 'businessarea': [], 'address': '博学路24', 'poiweight': '0.203285', 'name': '学生宿舍H-5', 'location': '113.677267,23.629149', 'distance': '433.01', 'tel': [], 'type': '地名地址信息;门牌信息;楼栋号'}, {'id': 'B0FFKQ210C', 'direction': '北', 'businessarea': [], 'address': [], 'poiweight': '0.218258', 'name': '中山大学南方学院聚贤楼7号', 'location': '113.680958,23.636938', 'distance': '514.173', 'tel': [], 'type': '商务住宅;商务住宅相关;商务住宅相关'}, {'id': 'B0FFHVQGBY', 'direction': '南', 'businessarea': [], 'address': [], 'poiweight': '0.170485', 'name': '广州市从化温泉塔洛灯商店', 'location': '113.680212,23.627906', 'distance': '527.663', 'tel': [], 'type': '购物服务;家居建材市场;家居建材市场'}, {'id': 'B0FFLJV95W', 'direction': '东北', 'businessarea': [], 'address': [], 'poiweight': '0.28899', 'name': '中山大学南方学院12BLOCK', 'location': '113.682608,23.636598', 'distance': '560.894', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFGF9WTH', 'direction': '东北', 'businessarea': [], 'address': '从化区', 'poiweight': '0.196592', 'name': '田螺山隧道', 'location': '113.683736,23.638949', 'distance': '841.305', 'tel': [], 'type': '地名地址信息;交通地名;隧道'}]}, 'info': 'OK', 'infocode': '10000'}\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>info</th>\n",
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>infocode</th>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.adcode</th>\n",
       "      <td>440117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.businessAreas</th>\n",
       "      <td>[[]]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.city</th>\n",
       "      <td>广州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.citycode</th>\n",
       "      <td>020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.country</th>\n",
       "      <td>中国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.district</th>\n",
       "      <td>从化区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.province</th>\n",
       "      <td>广东省</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.direction</th>\n",
       "      <td>西北</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.distance</th>\n",
       "      <td>109.203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.location</th>\n",
       "      <td>113.6786,23.6333289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.number</th>\n",
       "      <td>7号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.street</th>\n",
       "      <td>博学路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.towncode</th>\n",
       "      <td>440117103000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.township</th>\n",
       "      <td>温泉镇</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.aois</th>\n",
       "      <td>[{'area': '536585.849985', 'type': '141201', '...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.formatted_address</th>\n",
       "      <td>广东省广州市从化区温泉镇中山大学南方学院</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.pois</th>\n",
       "      <td>[{'id': 'B00140MR9A', 'direction': '西', 'busin...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.roadinters</th>\n",
       "      <td>[{'second_name': '中山路', 'first_id': '020F49F00...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.roads</th>\n",
       "      <td>[{'id': '020F49F0050461203', 'location': '113....</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>status</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                                                   0\n",
       "info                                                                                              OK\n",
       "infocode                                                                                       10000\n",
       "regeocode.addressComponent.adcode                                                             440117\n",
       "regeocode.addressComponent.building.name                                                          []\n",
       "regeocode.addressComponent.building.type                                                          []\n",
       "regeocode.addressComponent.businessAreas                                                        [[]]\n",
       "regeocode.addressComponent.city                                                                  广州市\n",
       "regeocode.addressComponent.citycode                                                              020\n",
       "regeocode.addressComponent.country                                                                中国\n",
       "regeocode.addressComponent.district                                                              从化区\n",
       "regeocode.addressComponent.neighborhood.name                                                      []\n",
       "regeocode.addressComponent.neighborhood.type                                                      []\n",
       "regeocode.addressComponent.province                                                              广东省\n",
       "regeocode.addressComponent.streetNumber.direction                                                 西北\n",
       "regeocode.addressComponent.streetNumber.distance                                             109.203\n",
       "regeocode.addressComponent.streetNumber.location                                 113.6786,23.6333289\n",
       "regeocode.addressComponent.streetNumber.number                                                    7号\n",
       "regeocode.addressComponent.streetNumber.street                                                   博学路\n",
       "regeocode.addressComponent.towncode                                                     440117103000\n",
       "regeocode.addressComponent.township                                                              温泉镇\n",
       "regeocode.aois                                     [{'area': '536585.849985', 'type': '141201', '...\n",
       "regeocode.formatted_address                                                     广东省广州市从化区温泉镇中山大学南方学院\n",
       "regeocode.pois                                     [{'id': 'B00140MR9A', 'direction': '西', 'busin...\n",
       "regeocode.roadinters                               [{'second_name': '中山路', 'first_id': '020F49F00...\n",
       "regeocode.roads                                    [{'id': '020F49F0050461203', 'location': '113....\n",
       "status                                                                                             1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "中大南方逆地理编码_all = regeocode(中大南方地理编码,extensions=\"all\")\n",
    "print(中大南方逆地理编码_all)\n",
    "df_中大南方逆地理编码_all = pd.io.json.json_normalize(中大南方逆地理编码_all).T\n",
    "display(df_中大南方逆地理编码_all)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 地理编码的强大，将输出的逆地理编码分门别类，各得其所"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>南</td>\n",
       "      <td>156.951</td>\n",
       "      <td>020F49F0050461203</td>\n",
       "      <td>113.68,23.634</td>\n",
       "      <td>博学路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>东南</td>\n",
       "      <td>343.951</td>\n",
       "      <td>020F49F0050462451</td>\n",
       "      <td>113.677,23.6347</td>\n",
       "      <td>中山路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>南</td>\n",
       "      <td>807.947</td>\n",
       "      <td>020F49F006047765</td>\n",
       "      <td>113.682,23.6394</td>\n",
       "      <td>S29从莞深高速</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  direction distance                 id         location      name\n",
       "0         南  156.951  020F49F0050461203    113.68,23.634       博学路\n",
       "1        东南  343.951  020F49F0050462451  113.677,23.6347       中山路\n",
       "2         南  807.947   020F49F006047765  113.682,23.6394  S29从莞深高速"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>first_id</th>\n",
       "      <th>first_name</th>\n",
       "      <th>location</th>\n",
       "      <th>second_id</th>\n",
       "      <th>second_name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>东南</td>\n",
       "      <td>343.951</td>\n",
       "      <td>020F49F0050461203</td>\n",
       "      <td>博学路</td>\n",
       "      <td>113.6767944,23.63466139</td>\n",
       "      <td>020F49F0050462451</td>\n",
       "      <td>中山路</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  direction distance           first_id first_name                 location  \\\n",
       "0        东南  343.951  020F49F0050461203        博学路  113.6767944,23.63466139   \n",
       "\n",
       "           second_id second_name  \n",
       "0  020F49F0050462451         中山路  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>area</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>440117</td>\n",
       "      <td>536585.849985</td>\n",
       "      <td>0</td>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>113.679262,23.632583</td>\n",
       "      <td>中山大学南方学院</td>\n",
       "      <td>141201</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   adcode           area distance          id              location      name  \\\n",
       "0  440117  536585.849985        0  B00140MR9A  113.679262,23.632583  中山大学南方学院   \n",
       "\n",
       "     type  \n",
       "0  141201  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>...</th>\n",
       "      <th>14</th>\n",
       "      <th>15</th>\n",
       "      <th>16</th>\n",
       "      <th>17</th>\n",
       "      <th>18</th>\n",
       "      <th>19</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>address</th>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>温泉大道886号中山大学南方学院内</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>温泉大道882</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>博学路21</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>笃行路2</td>\n",
       "      <td>温泉大道886号</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>中山大学南方学院明辩路2号第三饭堂</td>\n",
       "      <td>[]</td>\n",
       "      <td>温泉镇</td>\n",
       "      <td>温泉镇</td>\n",
       "      <td>博学路24</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>从化区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>businessarea</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>direction</th>\n",
       "      <td>西</td>\n",
       "      <td>东南</td>\n",
       "      <td>东北</td>\n",
       "      <td>西北</td>\n",
       "      <td>东北</td>\n",
       "      <td>西南</td>\n",
       "      <td>西南</td>\n",
       "      <td>南</td>\n",
       "      <td>南</td>\n",
       "      <td>东南</td>\n",
       "      <td>...</td>\n",
       "      <td>北</td>\n",
       "      <td>东北</td>\n",
       "      <td>东</td>\n",
       "      <td>东</td>\n",
       "      <td>东</td>\n",
       "      <td>西南</td>\n",
       "      <td>北</td>\n",
       "      <td>南</td>\n",
       "      <td>东北</td>\n",
       "      <td>东北</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>distance</th>\n",
       "      <td>2.69979</td>\n",
       "      <td>142.466</td>\n",
       "      <td>132.988</td>\n",
       "      <td>153.818</td>\n",
       "      <td>225.543</td>\n",
       "      <td>264.846</td>\n",
       "      <td>172.86</td>\n",
       "      <td>251.758</td>\n",
       "      <td>241.095</td>\n",
       "      <td>263.444</td>\n",
       "      <td>...</td>\n",
       "      <td>372.556</td>\n",
       "      <td>341.332</td>\n",
       "      <td>430.984</td>\n",
       "      <td>489.185</td>\n",
       "      <td>609.461</td>\n",
       "      <td>433.01</td>\n",
       "      <td>514.173</td>\n",
       "      <td>527.663</td>\n",
       "      <td>560.894</td>\n",
       "      <td>841.305</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>B0FFF2VMJ4</td>\n",
       "      <td>B0FFFTC9PH</td>\n",
       "      <td>B00141TQKX</td>\n",
       "      <td>B00141WQCO</td>\n",
       "      <td>B00141TRVH</td>\n",
       "      <td>B0FFKP9ET5</td>\n",
       "      <td>B00140TWHT</td>\n",
       "      <td>B0FFHC4XU0</td>\n",
       "      <td>B0FFLBEOND</td>\n",
       "      <td>...</td>\n",
       "      <td>B0FFKPXO2S</td>\n",
       "      <td>B0FFHHLMF8</td>\n",
       "      <td>B0FFGXGN3K</td>\n",
       "      <td>B0FFGQ2UG9</td>\n",
       "      <td>B0FFGBBC19</td>\n",
       "      <td>B00140U844</td>\n",
       "      <td>B0FFKQ210C</td>\n",
       "      <td>B0FFHVQGBY</td>\n",
       "      <td>B0FFLJV95W</td>\n",
       "      <td>B0FFGF9WTH</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>location</th>\n",
       "      <td>113.679262,23.632583</td>\n",
       "      <td>113.680117,23.631544</td>\n",
       "      <td>113.680125,23.633492</td>\n",
       "      <td>113.678424,23.633710</td>\n",
       "      <td>113.680399,23.634329</td>\n",
       "      <td>113.677060,23.631346</td>\n",
       "      <td>113.678215,23.631370</td>\n",
       "      <td>113.678490,23.630432</td>\n",
       "      <td>113.679959,23.630496</td>\n",
       "      <td>113.681253,23.631036</td>\n",
       "      <td>...</td>\n",
       "      <td>113.679394,23.635924</td>\n",
       "      <td>113.681901,23.634495</td>\n",
       "      <td>113.683474,23.632020</td>\n",
       "      <td>113.684021,23.633311</td>\n",
       "      <td>113.685212,23.633333</td>\n",
       "      <td>113.677267,23.629149</td>\n",
       "      <td>113.680958,23.636938</td>\n",
       "      <td>113.680212,23.627906</td>\n",
       "      <td>113.682608,23.636598</td>\n",
       "      <td>113.683736,23.638949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <td>中山大学南方学院</td>\n",
       "      <td>中山大学南方学院-综合楼</td>\n",
       "      <td>中山大学南方学院教学楼10号</td>\n",
       "      <td>中山大学南方学院教学楼6号</td>\n",
       "      <td>中山大学南方学院教学楼8号</td>\n",
       "      <td>中山大学南方学院教学楼2号</td>\n",
       "      <td>中山大学南方学院1号实验楼</td>\n",
       "      <td>教工住宅1号</td>\n",
       "      <td>中山大学南方学院学术交流中心</td>\n",
       "      <td>聚贤楼10号</td>\n",
       "      <td>...</td>\n",
       "      <td>中山大学南方学院医务室</td>\n",
       "      <td>茗语轩餐厅</td>\n",
       "      <td>中山大学南方学院宿舍H25</td>\n",
       "      <td>H23学生宿舍楼</td>\n",
       "      <td>保利桃花源</td>\n",
       "      <td>学生宿舍H-5</td>\n",
       "      <td>中山大学南方学院聚贤楼7号</td>\n",
       "      <td>广州市从化温泉塔洛灯商店</td>\n",
       "      <td>中山大学南方学院12BLOCK</td>\n",
       "      <td>田螺山隧道</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>poiweight</th>\n",
       "      <td>0.450402</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>0.193172</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>0.14954</td>\n",
       "      <td>0.148531</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>0.157653</td>\n",
       "      <td>0.158426</td>\n",
       "      <td>0.190963</td>\n",
       "      <td>...</td>\n",
       "      <td>0.188247</td>\n",
       "      <td>0.178935</td>\n",
       "      <td>0.188657</td>\n",
       "      <td>0.189884</td>\n",
       "      <td>0.2587</td>\n",
       "      <td>0.203285</td>\n",
       "      <td>0.218258</td>\n",
       "      <td>0.170485</td>\n",
       "      <td>0.28899</td>\n",
       "      <td>0.196592</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tel</th>\n",
       "      <td>020-61787326;020-61787333</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>13929501395</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>020-37918888</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>...</td>\n",
       "      <td>医疗保健服务;医疗保健服务场所;医疗保健服务场所</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>商务住宅;住宅区;别墅</td>\n",
       "      <td>地名地址信息;门牌信息;楼栋号</td>\n",
       "      <td>商务住宅;商务住宅相关;商务住宅相关</td>\n",
       "      <td>购物服务;家居建材市场;家居建材市场</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>地名地址信息;交通地名;隧道</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     0                     1   \\\n",
       "address                        温泉大道882号     温泉大道886号中山大学南方学院内   \n",
       "businessarea                         []                    []   \n",
       "direction                             西                    东南   \n",
       "distance                        2.69979               142.466   \n",
       "id                           B00140MR9A            B0FFF2VMJ4   \n",
       "location           113.679262,23.632583  113.680117,23.631544   \n",
       "name                           中山大学南方学院          中山大学南方学院-综合楼   \n",
       "poiweight                      0.450402              0.148531   \n",
       "tel           020-61787326;020-61787333                    []   \n",
       "type                     科教文化服务;学校;高等院校          科教文化服务;学校;学校   \n",
       "\n",
       "                                2                     3   \\\n",
       "address                      博学路附近               温泉大道882   \n",
       "businessarea                    []                    []   \n",
       "direction                       东北                    西北   \n",
       "distance                   132.988               153.818   \n",
       "id                      B0FFFTC9PH            B00141TQKX   \n",
       "location      113.680125,23.633492  113.678424,23.633710   \n",
       "name                中山大学南方学院教学楼10号         中山大学南方学院教学楼6号   \n",
       "poiweight                 0.193172              0.148531   \n",
       "tel                             []                    []   \n",
       "type          科教文化服务;科教文化场所;科教文化场所          科教文化服务;学校;学校   \n",
       "\n",
       "                                4                     5   \\\n",
       "address                      博学路附近                 博学路21   \n",
       "businessarea                    []                    []   \n",
       "direction                       东北                    西南   \n",
       "distance                   225.543               264.846   \n",
       "id                      B00141WQCO            B00141TRVH   \n",
       "location      113.680399,23.634329  113.677060,23.631346   \n",
       "name                 中山大学南方学院教学楼8号         中山大学南方学院教学楼2号   \n",
       "poiweight                  0.14954              0.148531   \n",
       "tel                             []                    []   \n",
       "type          科教文化服务;科教文化场所;科教文化场所  科教文化服务;科教文化场所;科教文化场所   \n",
       "\n",
       "                                6                     7   \\\n",
       "address                      博学路附近                  笃行路2   \n",
       "businessarea                    []                    []   \n",
       "direction                       西南                     南   \n",
       "distance                    172.86               251.758   \n",
       "id                      B0FFKP9ET5            B00140TWHT   \n",
       "location      113.678215,23.631370  113.678490,23.630432   \n",
       "name                 中山大学南方学院1号实验楼                教工住宅1号   \n",
       "poiweight                 0.191742              0.157653   \n",
       "tel                             []                    []   \n",
       "type          科教文化服务;科教文化场所;科教文化场所         商务住宅;住宅区;住宅小区   \n",
       "\n",
       "                                8                     9   ...  \\\n",
       "address                   温泉大道886号                    []  ...   \n",
       "businessarea                    []                    []  ...   \n",
       "direction                        南                    东南  ...   \n",
       "distance                   241.095               263.444  ...   \n",
       "id                      B0FFHC4XU0            B0FFLBEOND  ...   \n",
       "location      113.679959,23.630496  113.681253,23.631036  ...   \n",
       "name                中山大学南方学院学术交流中心                聚贤楼10号  ...   \n",
       "poiweight                 0.158426              0.190963  ...   \n",
       "tel                             []                    []  ...   \n",
       "type          科教文化服务;科教文化场所;科教文化场所           商务住宅;住宅区;宿舍  ...   \n",
       "\n",
       "                                    14                    15  \\\n",
       "address                          博学路附近     中山大学南方学院明辩路2号第三饭堂   \n",
       "businessarea                        []                    []   \n",
       "direction                            北                    东北   \n",
       "distance                       372.556               341.332   \n",
       "id                          B0FFKPXO2S            B0FFHHLMF8   \n",
       "location          113.679394,23.635924  113.681901,23.634495   \n",
       "name                       中山大学南方学院医务室                 茗语轩餐厅   \n",
       "poiweight                     0.188247              0.178935   \n",
       "tel                                 []           13929501395   \n",
       "type          医疗保健服务;医疗保健服务场所;医疗保健服务场所          餐饮服务;中餐厅;中餐厅   \n",
       "\n",
       "                                16                    17  \\\n",
       "address                         []                   温泉镇   \n",
       "businessarea                    []                    []   \n",
       "direction                        东                     东   \n",
       "distance                   430.984               489.185   \n",
       "id                      B0FFGXGN3K            B0FFGQ2UG9   \n",
       "location      113.683474,23.632020  113.684021,23.633311   \n",
       "name                 中山大学南方学院宿舍H25              H23学生宿舍楼   \n",
       "poiweight                 0.188657              0.189884   \n",
       "tel                             []                    []   \n",
       "type                   商务住宅;住宅区;宿舍           商务住宅;住宅区;宿舍   \n",
       "\n",
       "                                18                    19  \\\n",
       "address                        温泉镇                 博学路24   \n",
       "businessarea                    []                    []   \n",
       "direction                        东                    西南   \n",
       "distance                   609.461                433.01   \n",
       "id                      B0FFGBBC19            B00140U844   \n",
       "location      113.685212,23.633333  113.677267,23.629149   \n",
       "name                         保利桃花源               学生宿舍H-5   \n",
       "poiweight                   0.2587              0.203285   \n",
       "tel                   020-37918888                    []   \n",
       "type                   商务住宅;住宅区;别墅       地名地址信息;门牌信息;楼栋号   \n",
       "\n",
       "                                20                    21  \\\n",
       "address                         []                    []   \n",
       "businessarea                    []                    []   \n",
       "direction                        北                     南   \n",
       "distance                   514.173               527.663   \n",
       "id                      B0FFKQ210C            B0FFHVQGBY   \n",
       "location      113.680958,23.636938  113.680212,23.627906   \n",
       "name                 中山大学南方学院聚贤楼7号          广州市从化温泉塔洛灯商店   \n",
       "poiweight                 0.218258              0.170485   \n",
       "tel                             []                    []   \n",
       "type            商务住宅;商务住宅相关;商务住宅相关    购物服务;家居建材市场;家居建材市场   \n",
       "\n",
       "                                22                    23  \n",
       "address                         []                   从化区  \n",
       "businessarea                    []                    []  \n",
       "direction                       东北                    东北  \n",
       "distance                   560.894               841.305  \n",
       "id                      B0FFLJV95W            B0FFGF9WTH  \n",
       "location      113.682608,23.636598  113.683736,23.638949  \n",
       "name               中山大学南方学院12BLOCK                 田螺山隧道  \n",
       "poiweight                  0.28899              0.196592  \n",
       "tel                             []                    []  \n",
       "type                科教文化服务;学校;高等院校        地名地址信息;交通地名;隧道  \n",
       "\n",
       "[10 rows x 24 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "roads = pd.io.json.json_normalize(中大南方逆地理编码_all['regeocode']['roads'])\n",
    "roadinters = pd.io.json.json_normalize(中大南方逆地理编码_all['regeocode']['roadinters'])\n",
    "aois = pd.io.json.json_normalize(中大南方逆地理编码_all['regeocode']['aois'])\n",
    "# 前三个参数，司机关注\n",
    "pois = pd.io.json.json_normalize(中大南方逆地理编码_all['regeocode']['pois']).T #周边应用，相当于“地头蛇”的作用\n",
    "# 后一个参数，副驾驶关注\n",
    "display(roads,roadinters,aois,pois)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 用广金阶段练习"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'regeocode': {'addressComponent': {'city': '广州市', 'province': '广东省', 'adcode': '440106', 'district': '天河区', 'towncode': '440106018000', 'streetNumber': {'number': '527号', 'location': '113.37943,23.2007111', 'direction': '西南', 'distance': '240.979', 'street': '迎福路'}, 'country': '中国', 'township': '龙洞街道', 'businessAreas': [{'location': '113.368983,23.198619', 'name': '龙洞', 'id': '440106'}, {'location': '113.39672,23.193934', 'name': '柯木塱村', 'id': '440106'}], 'building': {'name': [], 'type': []}, 'neighborhood': {'name': [], 'type': []}, 'citycode': '020'}, 'formatted_address': '广东省广州市天河区龙洞街道广东金融学院'}, 'info': 'OK', 'infocode': '10000'}\n"
     ]
    }
   ],
   "source": [
    "广金逆地理编码_base = regeocode(广金地理编码)\n",
    "print(广金逆地理编码_base)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440106',\n",
       "   'district': '天河区',\n",
       "   'towncode': '440106018000',\n",
       "   'streetNumber': {'number': '527号',\n",
       "    'location': '113.37943,23.2007111',\n",
       "    'direction': '西南',\n",
       "    'distance': '240.979',\n",
       "    'street': '迎福路'},\n",
       "   'country': '中国',\n",
       "   'township': '龙洞街道',\n",
       "   'businessAreas': [{'location': '113.368983,23.198619',\n",
       "     'name': '龙洞',\n",
       "     'id': '440106'},\n",
       "    {'location': '113.39672,23.193934', 'name': '柯木塱村', 'id': '440106'}],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市天河区龙洞街道广东金融学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广金逆地理编码_base = regeocode(广金地理编码)\n",
    "广金逆地理编码_base"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'status': '1', 'regeocode': {'roads': [{'id': '020F49F0100444450', 'location': '113.381,23.2033', 'direction': '南', 'name': '融和路', 'distance': '83.1135'}, {'id': '020F49F01004318848', 'location': '113.379,23.2022', 'direction': '东', 'name': '金恒路', 'distance': '168.045'}, {'id': '020F49F0100437365', 'location': '113.382,23.201', 'direction': '西北', 'name': '金融南路', 'distance': '207.056'}], 'roadinters': [{'second_name': '融和路', 'first_id': '020F49F0100437365', 'second_id': '020F49F0100444450', 'location': '113.3819397,23.20103583', 'distance': '207.056', 'first_name': '金融南路', 'direction': '西北'}], 'formatted_address': '广东省广州市天河区龙洞街道广东金融学院', 'addressComponent': {'city': '广州市', 'province': '广东省', 'adcode': '440106', 'district': '天河区', 'towncode': '440106018000', 'streetNumber': {'number': '527号', 'location': '113.37943,23.2007111', 'direction': '西南', 'distance': '240.979', 'street': '迎福路'}, 'country': '中国', 'township': '龙洞街道', 'businessAreas': [{'location': '113.368983,23.198619', 'name': '龙洞', 'id': '440106'}, {'location': '113.39672,23.193934', 'name': '柯木塱村', 'id': '440106'}], 'building': {'name': [], 'type': []}, 'neighborhood': {'name': [], 'type': []}, 'citycode': '020'}, 'aois': [{'area': '390218.159855', 'type': '141201', 'id': 'B00140TX2A', 'location': '113.380696,23.202551', 'adcode': '440106', 'name': '广东金融学院', 'distance': '0'}], 'pois': [{'id': 'B00140TX2A', 'direction': '西北', 'businessarea': '龙洞', 'address': '龙洞迎福路527号(近39路公交车总站)', 'poiweight': '0.646253', 'name': '广东金融学院', 'location': '113.380696,23.202551', 'distance': '4.0168', 'tel': '020-37216000;020-37215393', 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFHB39TM', 'direction': '东北', 'businessarea': '龙洞', 'address': '迎福路527号(近39路公交车总站)广东金融学院龙洞街道龙洞', 'poiweight': '0.291455', 'name': '广东金融学院-教学主楼', 'location': '113.380801,23.202558', 'distance': '8.93891', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B00141KAU4', 'direction': '西南', 'businessarea': '龙洞', 'address': '龙洞迎福路527号', 'poiweight': '0.311245', 'name': '广东金融学院-继续教育学院', 'location': '113.378950,23.201208', 'distance': '232.827', 'tel': '020-37216810', 'type': '科教文化服务;学校;成人教育'}, {'id': 'B0FFFFZFDS', 'direction': '西南', 'businessarea': '龙洞', 'address': '金恒路与金融南路交叉口东北50米', 'poiweight': '0.219029', 'name': '广东金融学院科技金融发展研究中心', 'location': '113.379434,23.200576', 'distance': '253.463', 'tel': [], 'type': '科教文化服务;科研机构;科研机构'}, {'id': 'B00141OJWG', 'direction': '东', 'businessarea': '龙洞', 'address': '龙洞广东金融学院迎福路527号学校', 'poiweight': '0.29834', 'name': '广东金融学院北苑', 'location': '113.382951,23.202711', 'distance': '228.783', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B00141KBIL', 'direction': '西南', 'businessarea': '龙洞', 'address': '金恒路与金融南路交叉口西北100米', 'poiweight': '0.197208', 'name': '广州市广播电视大学(金融分校)', 'location': '113.378527,23.200766', 'distance': '297.551', 'tel': [], 'type': '科教文化服务;学校;成人教育'}, {'id': 'B0FFFFYY54', 'direction': '东南', 'businessarea': '龙洞', 'address': '融和路与金融南路交叉口南50米', 'poiweight': '0.189127', 'name': '广东金融学院南苑', 'location': '113.382023,23.200671', 'distance': '245.219', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B00141KAU1', 'direction': '西南', 'businessarea': '龙洞', 'address': '龙洞迎福路527号', 'poiweight': '0.16215', 'name': '广东金融学院教师办公楼', 'location': '113.378943,23.201208', 'distance': '233.38', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFG6EP37', 'direction': '南', 'businessarea': '龙洞', 'address': [], 'poiweight': '0.188101', 'name': '广东金融学院-青年文化广场', 'location': '113.380335,23.199835', 'distance': '301.609', 'tel': [], 'type': '风景名胜;公园广场;城市广场'}, {'id': 'B00141KB83', 'direction': '西南', 'businessarea': '龙洞', 'address': '迎福路527号广东金融学院', 'poiweight': '0.243632', 'name': '广东金融学院实验教学中心', 'location': '113.379430,23.200711', 'distance': '240.979', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFFFYICW', 'direction': '东南', 'businessarea': '龙洞', 'address': '融和路与金融南路交叉口南100米广东金融学院', 'poiweight': '0.189127', 'name': '广东金融学院金晖苑', 'location': '113.382090,23.200549', 'distance': '260.353', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B00141JG3K', 'direction': '西南', 'businessarea': '龙洞', 'address': '金融学院图书馆5-6楼', 'poiweight': '0.48', 'name': '广州货币金融博物馆', 'location': '113.379210,23.199542', 'distance': '365.832', 'tel': '020-37216839;020-37216805', 'type': '科教文化服务;博物馆;博物馆'}, {'id': 'B0FFHB39AP', 'direction': '东', 'businessarea': '龙洞', 'address': '金曦路与融德路交叉口南100米', 'poiweight': '0.291455', 'name': '广东金融学院教学主楼北楼A', 'location': '113.381808,23.202655', 'distance': '111.96', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFFFYLSZ', 'direction': '南', 'businessarea': '龙洞', 'address': '融和路与金融南路交叉口西南150米', 'poiweight': '0.200682', 'name': '广东金融学院心理健康教育与咨询中心', 'location': '113.381145,23.200166', 'distance': '265.726', 'tel': '020-37215356;020-37215962', 'type': '医疗保健服务;医疗保健服务场所;医疗保健服务场所'}, {'id': 'B0FFFFZIF0', 'direction': '西南', 'businessarea': '龙洞', 'address': '融和路与金恒路交叉口西50米', 'poiweight': '0.233203', 'name': '广东金融学院应用数学系', 'location': '113.378942,23.201209', 'distance': '233.41', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFHB39AI', 'direction': '西', 'businessarea': '龙洞', 'address': '融和路与金恒路交叉口东150米', 'poiweight': '0.291455', 'name': '广东金融学院教学主楼北楼C', 'location': '113.379272,23.203057', 'distance': '159.613', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFG6EKTX', 'direction': '东北', 'businessarea': '龙洞', 'address': '剑咀路广东金融学院22B号楼附近', 'poiweight': '0.177669', 'name': '广东金融学院大学生创业孵化基地', 'location': '113.382359,23.204533', 'distance': '279.118', 'tel': [], 'type': '商务住宅;产业园区;产业园区'}, {'id': 'B00141KB7Z', 'direction': '西南', 'businessarea': '龙洞', 'address': '迎福路512号附近', 'poiweight': '0.23287', 'name': '广东金融学院图书馆自科馆', 'location': '113.379441,23.199782', 'distance': '331.819', 'tel': [], 'type': '科教文化服务;图书馆;图书馆'}, {'id': 'B00141K9ZH', 'direction': '南', 'businessarea': '龙洞', 'address': '金恒路与金融南路交叉口东南200米', 'poiweight': '0.166351', 'name': '广东金融学院金海楼', 'location': '113.380127,23.199314', 'distance': '362.095', 'tel': [], 'type': '商务住宅;住宅区;宿舍'}, {'id': 'B0FFK1ARNW', 'direction': '西南', 'businessarea': '龙洞', 'address': '龙洞迎福路512号', 'poiweight': '0.260446', 'name': '广东金融学院图书馆', 'location': '113.379192,23.199526', 'distance': '368.209', 'tel': [], 'type': '科教文化服务;图书馆;图书馆'}, {'id': 'B0FFF7UYPV', 'direction': '南', 'businessarea': '龙洞', 'address': '广东金融学院宿舍15号楼', 'poiweight': '0.108226', 'name': '广东金融学院15号', 'location': '113.380688,23.201125', 'distance': '155.595', 'tel': [], 'type': '地名地址信息;门牌信息;楼栋号'}, {'id': 'B0FFFFYO46', 'direction': '南', 'businessarea': '龙洞', 'address': '迎福路527号', 'poiweight': '0.48', 'name': '广东金融学院-图书馆综合馆', 'location': '113.381524,23.198511', 'distance': '453.686', 'tel': '020-37215600', 'type': '科教文化服务;图书馆;图书馆'}, {'id': 'B0FFFFYLT1', 'direction': '南', 'businessarea': '龙洞', 'address': '金恒路与金融南路交叉口东南200米', 'poiweight': '0.244446', 'name': '广东金融学院社区医疗中心', 'location': '113.380610,23.199482', 'distance': '338.458', 'tel': [], 'type': '医疗保健服务;诊所;诊所'}, {'id': 'B0FFHB36VG', 'direction': '东北', 'businessarea': '龙洞', 'address': '金曦路与融德路交叉口东北50米', 'poiweight': '0.183035', 'name': '广东金融学院18B号楼', 'location': '113.382056,23.203539', 'distance': '177.011', 'tel': [], 'type': '地名地址信息;门牌信息;楼栋号'}, {'id': 'B0FFG8RMVU', 'direction': '西北', 'businessarea': '龙洞', 'address': '迎福路527号广东金融学院', 'poiweight': '0.220403', 'name': '广东金融学院-北苑运动场', 'location': '113.378977,23.204460', 'distance': '279.571', 'tel': [], 'type': '体育休闲服务;运动场馆;运动场所'}, {'id': 'B0FFF8JECW', 'direction': '东北', 'businessarea': '龙洞', 'address': '天河区', 'poiweight': '0.108226', 'name': '广东金融学院北苑19A栋', 'location': '113.383138,23.203753', 'distance': '282.244', 'tel': [], 'type': '地名地址信息;门牌信息;楼栋号'}, {'id': 'B00140UQ25', 'direction': '西', 'businessarea': '龙洞', 'address': '龙洞北路321号', 'poiweight': '0.546898', 'name': '广东食品药品职业学院', 'location': '113.375681,23.202865', 'distance': '516.597', 'tel': '020-37216565;020-28854882', 'type': '科教文化服务;学校;高等院校'}, {'id': 'B00140UEZ7', 'direction': '东南', 'businessarea': '龙洞', 'address': '龙洞华美路23号', 'poiweight': '0.471803', 'name': '广州华美英语实验学校', 'location': '113.384596,23.199519', 'distance': '518.122', 'tel': '020-87210178', 'type': '科教文化服务;学校;中学'}, {'id': 'B0FFFFYLT7', 'direction': '南', 'businessarea': '龙洞', 'address': '金融南路广东金融学院内', 'poiweight': '0.319484', 'name': '广东金融学院学生工作处', 'location': '113.381108,23.198828', 'distance': '412.867', 'tel': [], 'type': '科教文化服务;学校;高等院校'}, {'id': 'B0FFFT57HF', 'direction': '西', 'businessarea': '龙洞', 'address': '龙洞北路东150米', 'poiweight': '0.201904', 'name': '食品药品学院大礼堂', 'location': '113.376039,23.204138', 'distance': '511.183', 'tel': [], 'type': '科教文化服务;培训机构;培训机构'}]}, 'info': 'OK', 'infocode': '10000'}\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>info</th>\n",
       "      <td>OK</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>infocode</th>\n",
       "      <td>10000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.adcode</th>\n",
       "      <td>440106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.building.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.businessAreas</th>\n",
       "      <td>[{'location': '113.368983,23.198619', 'name': ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.city</th>\n",
       "      <td>广州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.citycode</th>\n",
       "      <td>020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.country</th>\n",
       "      <td>中国</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.district</th>\n",
       "      <td>天河区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.name</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.neighborhood.type</th>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.province</th>\n",
       "      <td>广东省</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.direction</th>\n",
       "      <td>西南</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.distance</th>\n",
       "      <td>240.979</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.location</th>\n",
       "      <td>113.37943,23.2007111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.number</th>\n",
       "      <td>527号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.streetNumber.street</th>\n",
       "      <td>迎福路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.towncode</th>\n",
       "      <td>440106018000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.addressComponent.township</th>\n",
       "      <td>龙洞街道</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.aois</th>\n",
       "      <td>[{'area': '390218.159855', 'type': '141201', '...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.formatted_address</th>\n",
       "      <td>广东省广州市天河区龙洞街道广东金融学院</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.pois</th>\n",
       "      <td>[{'id': 'B00140TX2A', 'direction': '西北', 'busi...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.roadinters</th>\n",
       "      <td>[{'second_name': '融和路', 'first_id': '020F49F01...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>regeocode.roads</th>\n",
       "      <td>[{'id': '020F49F0100444450', 'location': '113....</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>status</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                                                   0\n",
       "info                                                                                              OK\n",
       "infocode                                                                                       10000\n",
       "regeocode.addressComponent.adcode                                                             440106\n",
       "regeocode.addressComponent.building.name                                                          []\n",
       "regeocode.addressComponent.building.type                                                          []\n",
       "regeocode.addressComponent.businessAreas           [{'location': '113.368983,23.198619', 'name': ...\n",
       "regeocode.addressComponent.city                                                                  广州市\n",
       "regeocode.addressComponent.citycode                                                              020\n",
       "regeocode.addressComponent.country                                                                中国\n",
       "regeocode.addressComponent.district                                                              天河区\n",
       "regeocode.addressComponent.neighborhood.name                                                      []\n",
       "regeocode.addressComponent.neighborhood.type                                                      []\n",
       "regeocode.addressComponent.province                                                              广东省\n",
       "regeocode.addressComponent.streetNumber.direction                                                 西南\n",
       "regeocode.addressComponent.streetNumber.distance                                             240.979\n",
       "regeocode.addressComponent.streetNumber.location                                113.37943,23.2007111\n",
       "regeocode.addressComponent.streetNumber.number                                                  527号\n",
       "regeocode.addressComponent.streetNumber.street                                                   迎福路\n",
       "regeocode.addressComponent.towncode                                                     440106018000\n",
       "regeocode.addressComponent.township                                                             龙洞街道\n",
       "regeocode.aois                                     [{'area': '390218.159855', 'type': '141201', '...\n",
       "regeocode.formatted_address                                                      广东省广州市天河区龙洞街道广东金融学院\n",
       "regeocode.pois                                     [{'id': 'B00140TX2A', 'direction': '西北', 'busi...\n",
       "regeocode.roadinters                               [{'second_name': '融和路', 'first_id': '020F49F01...\n",
       "regeocode.roads                                    [{'id': '020F49F0100444450', 'location': '113....\n",
       "status                                                                                             1"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "广金逆地理编码_all = regeocode(广金地理编码,extensions=\"all\")\n",
    "print(广金逆地理编码_all)\n",
    "df_广金逆地理编码_all = pd.io.json.json_normalize(广金逆地理编码_all).T\n",
    "display(df_广金逆地理编码_all)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>南</td>\n",
       "      <td>83.1135</td>\n",
       "      <td>020F49F0100444450</td>\n",
       "      <td>113.381,23.2033</td>\n",
       "      <td>融和路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>东</td>\n",
       "      <td>168.045</td>\n",
       "      <td>020F49F01004318848</td>\n",
       "      <td>113.379,23.2022</td>\n",
       "      <td>金恒路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>西北</td>\n",
       "      <td>207.056</td>\n",
       "      <td>020F49F0100437365</td>\n",
       "      <td>113.382,23.201</td>\n",
       "      <td>金融南路</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  direction distance                  id         location  name\n",
       "0         南  83.1135   020F49F0100444450  113.381,23.2033   融和路\n",
       "1         东  168.045  020F49F01004318848  113.379,23.2022   金恒路\n",
       "2        西北  207.056   020F49F0100437365   113.382,23.201  金融南路"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>first_id</th>\n",
       "      <th>first_name</th>\n",
       "      <th>location</th>\n",
       "      <th>second_id</th>\n",
       "      <th>second_name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>西北</td>\n",
       "      <td>207.056</td>\n",
       "      <td>020F49F0100437365</td>\n",
       "      <td>金融南路</td>\n",
       "      <td>113.3819397,23.20103583</td>\n",
       "      <td>020F49F0100444450</td>\n",
       "      <td>融和路</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  direction distance           first_id first_name                 location  \\\n",
       "0        西北  207.056  020F49F0100437365       金融南路  113.3819397,23.20103583   \n",
       "\n",
       "           second_id second_name  \n",
       "0  020F49F0100444450         融和路  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>area</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>location</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>440106</td>\n",
       "      <td>390218.159855</td>\n",
       "      <td>0</td>\n",
       "      <td>B00140TX2A</td>\n",
       "      <td>113.380696,23.202551</td>\n",
       "      <td>广东金融学院</td>\n",
       "      <td>141201</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   adcode           area distance          id              location    name  \\\n",
       "0  440106  390218.159855        0  B00140TX2A  113.380696,23.202551  广东金融学院   \n",
       "\n",
       "     type  \n",
       "0  141201  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>...</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>address</th>\n",
       "      <td>龙洞迎福路527号(近39路公交车总站)</td>\n",
       "      <td>迎福路527号(近39路公交车总站)广东金融学院龙洞街道龙洞</td>\n",
       "      <td>龙洞迎福路527号</td>\n",
       "      <td>金恒路与金融南路交叉口东北50米</td>\n",
       "      <td>龙洞广东金融学院迎福路527号学校</td>\n",
       "      <td>金恒路与金融南路交叉口西北100米</td>\n",
       "      <td>融和路与金融南路交叉口南50米</td>\n",
       "      <td>龙洞迎福路527号</td>\n",
       "      <td>[]</td>\n",
       "      <td>迎福路527号广东金融学院</td>\n",
       "      <td>...</td>\n",
       "      <td>广东金融学院宿舍15号楼</td>\n",
       "      <td>迎福路527号</td>\n",
       "      <td>金恒路与金融南路交叉口东南200米</td>\n",
       "      <td>金曦路与融德路交叉口东北50米</td>\n",
       "      <td>迎福路527号广东金融学院</td>\n",
       "      <td>天河区</td>\n",
       "      <td>龙洞北路321号</td>\n",
       "      <td>龙洞华美路23号</td>\n",
       "      <td>金融南路广东金融学院内</td>\n",
       "      <td>龙洞北路东150米</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>businessarea</th>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>...</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "      <td>龙洞</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>direction</th>\n",
       "      <td>西北</td>\n",
       "      <td>东北</td>\n",
       "      <td>西南</td>\n",
       "      <td>西南</td>\n",
       "      <td>东</td>\n",
       "      <td>西南</td>\n",
       "      <td>东南</td>\n",
       "      <td>西南</td>\n",
       "      <td>南</td>\n",
       "      <td>西南</td>\n",
       "      <td>...</td>\n",
       "      <td>南</td>\n",
       "      <td>南</td>\n",
       "      <td>南</td>\n",
       "      <td>东北</td>\n",
       "      <td>西北</td>\n",
       "      <td>东北</td>\n",
       "      <td>西</td>\n",
       "      <td>东南</td>\n",
       "      <td>南</td>\n",
       "      <td>西</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>distance</th>\n",
       "      <td>4.0168</td>\n",
       "      <td>8.93891</td>\n",
       "      <td>232.827</td>\n",
       "      <td>253.463</td>\n",
       "      <td>228.783</td>\n",
       "      <td>297.551</td>\n",
       "      <td>245.219</td>\n",
       "      <td>233.38</td>\n",
       "      <td>301.609</td>\n",
       "      <td>240.979</td>\n",
       "      <td>...</td>\n",
       "      <td>155.595</td>\n",
       "      <td>453.686</td>\n",
       "      <td>338.458</td>\n",
       "      <td>177.011</td>\n",
       "      <td>279.571</td>\n",
       "      <td>282.244</td>\n",
       "      <td>516.597</td>\n",
       "      <td>518.122</td>\n",
       "      <td>412.867</td>\n",
       "      <td>511.183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <td>B00140TX2A</td>\n",
       "      <td>B0FFHB39TM</td>\n",
       "      <td>B00141KAU4</td>\n",
       "      <td>B0FFFFZFDS</td>\n",
       "      <td>B00141OJWG</td>\n",
       "      <td>B00141KBIL</td>\n",
       "      <td>B0FFFFYY54</td>\n",
       "      <td>B00141KAU1</td>\n",
       "      <td>B0FFG6EP37</td>\n",
       "      <td>B00141KB83</td>\n",
       "      <td>...</td>\n",
       "      <td>B0FFF7UYPV</td>\n",
       "      <td>B0FFFFYO46</td>\n",
       "      <td>B0FFFFYLT1</td>\n",
       "      <td>B0FFHB36VG</td>\n",
       "      <td>B0FFG8RMVU</td>\n",
       "      <td>B0FFF8JECW</td>\n",
       "      <td>B00140UQ25</td>\n",
       "      <td>B00140UEZ7</td>\n",
       "      <td>B0FFFFYLT7</td>\n",
       "      <td>B0FFFT57HF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>location</th>\n",
       "      <td>113.380696,23.202551</td>\n",
       "      <td>113.380801,23.202558</td>\n",
       "      <td>113.378950,23.201208</td>\n",
       "      <td>113.379434,23.200576</td>\n",
       "      <td>113.382951,23.202711</td>\n",
       "      <td>113.378527,23.200766</td>\n",
       "      <td>113.382023,23.200671</td>\n",
       "      <td>113.378943,23.201208</td>\n",
       "      <td>113.380335,23.199835</td>\n",
       "      <td>113.379430,23.200711</td>\n",
       "      <td>...</td>\n",
       "      <td>113.380688,23.201125</td>\n",
       "      <td>113.381524,23.198511</td>\n",
       "      <td>113.380610,23.199482</td>\n",
       "      <td>113.382056,23.203539</td>\n",
       "      <td>113.378977,23.204460</td>\n",
       "      <td>113.383138,23.203753</td>\n",
       "      <td>113.375681,23.202865</td>\n",
       "      <td>113.384596,23.199519</td>\n",
       "      <td>113.381108,23.198828</td>\n",
       "      <td>113.376039,23.204138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <td>广东金融学院</td>\n",
       "      <td>广东金融学院-教学主楼</td>\n",
       "      <td>广东金融学院-继续教育学院</td>\n",
       "      <td>广东金融学院科技金融发展研究中心</td>\n",
       "      <td>广东金融学院北苑</td>\n",
       "      <td>广州市广播电视大学(金融分校)</td>\n",
       "      <td>广东金融学院南苑</td>\n",
       "      <td>广东金融学院教师办公楼</td>\n",
       "      <td>广东金融学院-青年文化广场</td>\n",
       "      <td>广东金融学院实验教学中心</td>\n",
       "      <td>...</td>\n",
       "      <td>广东金融学院15号</td>\n",
       "      <td>广东金融学院-图书馆综合馆</td>\n",
       "      <td>广东金融学院社区医疗中心</td>\n",
       "      <td>广东金融学院18B号楼</td>\n",
       "      <td>广东金融学院-北苑运动场</td>\n",
       "      <td>广东金融学院北苑19A栋</td>\n",
       "      <td>广东食品药品职业学院</td>\n",
       "      <td>广州华美英语实验学校</td>\n",
       "      <td>广东金融学院学生工作处</td>\n",
       "      <td>食品药品学院大礼堂</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>poiweight</th>\n",
       "      <td>0.646253</td>\n",
       "      <td>0.291455</td>\n",
       "      <td>0.311245</td>\n",
       "      <td>0.219029</td>\n",
       "      <td>0.29834</td>\n",
       "      <td>0.197208</td>\n",
       "      <td>0.189127</td>\n",
       "      <td>0.16215</td>\n",
       "      <td>0.188101</td>\n",
       "      <td>0.243632</td>\n",
       "      <td>...</td>\n",
       "      <td>0.108226</td>\n",
       "      <td>0.48</td>\n",
       "      <td>0.244446</td>\n",
       "      <td>0.183035</td>\n",
       "      <td>0.220403</td>\n",
       "      <td>0.108226</td>\n",
       "      <td>0.546898</td>\n",
       "      <td>0.471803</td>\n",
       "      <td>0.319484</td>\n",
       "      <td>0.201904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tel</th>\n",
       "      <td>020-37216000;020-37215393</td>\n",
       "      <td>[]</td>\n",
       "      <td>020-37216810</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>020-37215600</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>020-37216565;020-28854882</td>\n",
       "      <td>020-87210178</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>科教文化服务;学校;成人教育</td>\n",
       "      <td>科教文化服务;科研机构;科研机构</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>科教文化服务;学校;成人教育</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>风景名胜;公园广场;城市广场</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>...</td>\n",
       "      <td>地名地址信息;门牌信息;楼栋号</td>\n",
       "      <td>科教文化服务;图书馆;图书馆</td>\n",
       "      <td>医疗保健服务;诊所;诊所</td>\n",
       "      <td>地名地址信息;门牌信息;楼栋号</td>\n",
       "      <td>体育休闲服务;运动场馆;运动场所</td>\n",
       "      <td>地名地址信息;门牌信息;楼栋号</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>科教文化服务;学校;中学</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>科教文化服务;培训机构;培训机构</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 30 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     0                               1   \\\n",
       "address            龙洞迎福路527号(近39路公交车总站)  迎福路527号(近39路公交车总站)广东金融学院龙洞街道龙洞   \n",
       "businessarea                         龙洞                              龙洞   \n",
       "direction                            西北                              东北   \n",
       "distance                         4.0168                         8.93891   \n",
       "id                           B00140TX2A                      B0FFHB39TM   \n",
       "location           113.380696,23.202551            113.380801,23.202558   \n",
       "name                             广东金融学院                     广东金融学院-教学主楼   \n",
       "poiweight                      0.646253                        0.291455   \n",
       "tel           020-37216000;020-37215393                              []   \n",
       "type                     科教文化服务;学校;高等院校                  科教文化服务;学校;高等院校   \n",
       "\n",
       "                                2                     3   \\\n",
       "address                  龙洞迎福路527号      金恒路与金融南路交叉口东北50米   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                       西南                    西南   \n",
       "distance                   232.827               253.463   \n",
       "id                      B00141KAU4            B0FFFFZFDS   \n",
       "location      113.378950,23.201208  113.379434,23.200576   \n",
       "name                 广东金融学院-继续教育学院      广东金融学院科技金融发展研究中心   \n",
       "poiweight                 0.311245              0.219029   \n",
       "tel                   020-37216810                    []   \n",
       "type                科教文化服务;学校;成人教育      科教文化服务;科研机构;科研机构   \n",
       "\n",
       "                                4                     5   \\\n",
       "address          龙洞广东金融学院迎福路527号学校     金恒路与金融南路交叉口西北100米   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                        东                    西南   \n",
       "distance                   228.783               297.551   \n",
       "id                      B00141OJWG            B00141KBIL   \n",
       "location      113.382951,23.202711  113.378527,23.200766   \n",
       "name                      广东金融学院北苑       广州市广播电视大学(金融分校)   \n",
       "poiweight                  0.29834              0.197208   \n",
       "tel                             []                    []   \n",
       "type                   商务住宅;住宅区;宿舍        科教文化服务;学校;成人教育   \n",
       "\n",
       "                                6                     7   \\\n",
       "address            融和路与金融南路交叉口南50米             龙洞迎福路527号   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                       东南                    西南   \n",
       "distance                   245.219                233.38   \n",
       "id                      B0FFFFYY54            B00141KAU1   \n",
       "location      113.382023,23.200671  113.378943,23.201208   \n",
       "name                      广东金融学院南苑           广东金融学院教师办公楼   \n",
       "poiweight                 0.189127               0.16215   \n",
       "tel                             []                    []   \n",
       "type                   商务住宅;住宅区;宿舍        科教文化服务;学校;高等院校   \n",
       "\n",
       "                                8                     9   ...  \\\n",
       "address                         []         迎福路527号广东金融学院  ...   \n",
       "businessarea                    龙洞                    龙洞  ...   \n",
       "direction                        南                    西南  ...   \n",
       "distance                   301.609               240.979  ...   \n",
       "id                      B0FFG6EP37            B00141KB83  ...   \n",
       "location      113.380335,23.199835  113.379430,23.200711  ...   \n",
       "name                 广东金融学院-青年文化广场          广东金融学院实验教学中心  ...   \n",
       "poiweight                 0.188101              0.243632  ...   \n",
       "tel                             []                    []  ...   \n",
       "type                风景名胜;公园广场;城市广场        科教文化服务;学校;高等院校  ...   \n",
       "\n",
       "                                20                    21  \\\n",
       "address               广东金融学院宿舍15号楼               迎福路527号   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                        南                     南   \n",
       "distance                   155.595               453.686   \n",
       "id                      B0FFF7UYPV            B0FFFFYO46   \n",
       "location      113.380688,23.201125  113.381524,23.198511   \n",
       "name                     广东金融学院15号         广东金融学院-图书馆综合馆   \n",
       "poiweight                 0.108226                  0.48   \n",
       "tel                             []          020-37215600   \n",
       "type               地名地址信息;门牌信息;楼栋号        科教文化服务;图书馆;图书馆   \n",
       "\n",
       "                                22                    23  \\\n",
       "address          金恒路与金融南路交叉口东南200米       金曦路与融德路交叉口东北50米   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                        南                    东北   \n",
       "distance                   338.458               177.011   \n",
       "id                      B0FFFFYLT1            B0FFHB36VG   \n",
       "location      113.380610,23.199482  113.382056,23.203539   \n",
       "name                  广东金融学院社区医疗中心           广东金融学院18B号楼   \n",
       "poiweight                 0.244446              0.183035   \n",
       "tel                             []                    []   \n",
       "type                  医疗保健服务;诊所;诊所       地名地址信息;门牌信息;楼栋号   \n",
       "\n",
       "                                24                    25  \\\n",
       "address              迎福路527号广东金融学院                   天河区   \n",
       "businessarea                    龙洞                    龙洞   \n",
       "direction                       西北                    东北   \n",
       "distance                   279.571               282.244   \n",
       "id                      B0FFG8RMVU            B0FFF8JECW   \n",
       "location      113.378977,23.204460  113.383138,23.203753   \n",
       "name                  广东金融学院-北苑运动场          广东金融学院北苑19A栋   \n",
       "poiweight                 0.220403              0.108226   \n",
       "tel                             []                    []   \n",
       "type              体育休闲服务;运动场馆;运动场所       地名地址信息;门牌信息;楼栋号   \n",
       "\n",
       "                                     26                    27  \\\n",
       "address                        龙洞北路321号              龙洞华美路23号   \n",
       "businessarea                         龙洞                    龙洞   \n",
       "direction                             西                    东南   \n",
       "distance                        516.597               518.122   \n",
       "id                           B00140UQ25            B00140UEZ7   \n",
       "location           113.375681,23.202865  113.384596,23.199519   \n",
       "name                         广东食品药品职业学院            广州华美英语实验学校   \n",
       "poiweight                      0.546898              0.471803   \n",
       "tel           020-37216565;020-28854882          020-87210178   \n",
       "type                     科教文化服务;学校;高等院校          科教文化服务;学校;中学   \n",
       "\n",
       "                                28                    29  \n",
       "address                金融南路广东金融学院内             龙洞北路东150米  \n",
       "businessarea                    龙洞                    龙洞  \n",
       "direction                        南                     西  \n",
       "distance                   412.867               511.183  \n",
       "id                      B0FFFFYLT7            B0FFFT57HF  \n",
       "location      113.381108,23.198828  113.376039,23.204138  \n",
       "name                   广东金融学院学生工作处             食品药品学院大礼堂  \n",
       "poiweight                 0.319484              0.201904  \n",
       "tel                             []                    []  \n",
       "type                科教文化服务;学校;高等院校      科教文化服务;培训机构;培训机构  \n",
       "\n",
       "[10 rows x 30 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "roads = pd.io.json.json_normalize(广金逆地理编码_all['regeocode']['roads'])\n",
    "roadinters = pd.io.json.json_normalize(广金逆地理编码_all['regeocode']['roadinters'])\n",
    "aois = pd.io.json.json_normalize(广金逆地理编码_all['regeocode']['aois'])\n",
    "# 前三个参数，司机关注\n",
    "pois = pd.io.json.json_normalize(广金逆地理编码_all['regeocode']['pois']).T #周边应用，相当于“地头蛇”的作用\n",
    "# 后一个参数，副驾驶关注\n",
    "display(roads,roadinters,aois,pois)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 逆地理编码参数一览表\n",
    "![lianxi01.png](https://i.loli.net/2020/04/22/uJLMiDxY9hlHB1C.jpg)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 路径规划\n",
    "\n",
    "1. 无需展现地图的场景下，进行线路查询，如以线路结果页形式展现换乘方案；\n",
    "\n",
    "2. 根据返回线路数据，自行开发线路导航。\n",
    "\n",
    "3. 结合AI人工智能语音提醒，可以让路痴不再迷路\n",
    "\n",
    "![](http://imgtec.eetrend.com/files/2019-03/%E5%8D%9A%E5%AE%A2/100018447-63696-10.jpg)\n",
    "\n",
    "-----\n",
    "![](https://pic2.zhimg.com/50/v2-45a26a9985308d90405dea78e6892dd0_r.jpg)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 前期准备，base url，参数，返回的数据，封装成函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "def walking(origin,destination,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/walking?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 准备walking 参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(起点)揭阳一中_location: 116.349701,23.543100 (终点)湖滨居委会_location: 116.141873,23.440937\n"
     ]
    }
   ],
   "source": [
    "湖滨居委会 = geocode('广东省揭阳市揭西县棉湖镇湖滨居委会')\n",
    "湖滨居委会\n",
    "# 输入新地址，新建地理编码\n",
    "湖滨居委会_location = 湖滨居委会['geocodes'][0]['location']\n",
    "揭阳一中 = geocode(address='广东省揭阳市榕城区揭阳第一中学')\n",
    "揭阳一中\n",
    "# 输入新地址，新建地理编码\n",
    "揭阳一中_location = 揭阳一中['geocodes'][0]['location']\n",
    "print(\"(起点)揭阳一中_location:\",揭阳一中_location,\"(终点)湖滨居委会_location:\",湖滨居委会_location)\n",
    "# 将新地址设置为起点和终点"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 实施步行规划\n",
    "##### 常规步行路径"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>action</th>\n",
       "      <th>assistant_action</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>instruction</th>\n",
       "      <th>orientation</th>\n",
       "      <th>polyline</th>\n",
       "      <th>road</th>\n",
       "      <th>walk_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>67</td>\n",
       "      <td>54</td>\n",
       "      <td>向西北步行67米右转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.349918,23.543537;116.349323,23.543789</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>185</td>\n",
       "      <td>148</td>\n",
       "      <td>向西北步行185米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.349319,23.543789;116.349379,23.543919;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>735</td>\n",
       "      <td>588</td>\n",
       "      <td>沿淡浦路向西南步行735米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.347921,23.544601;116.347743,23.544206;116....</td>\n",
       "      <td>淡浦路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>110</td>\n",
       "      <td>88</td>\n",
       "      <td>沿西环城路向南步行110米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.344657,23.53872;116.34447,23.537808;116.34...</td>\n",
       "      <td>西环城路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>步行12米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.34444,23.537734;116.344332,23.537765</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>10</td>\n",
       "      <td>8</td>\n",
       "      <td>沿西环城路向北步行10米</td>\n",
       "      <td>北</td>\n",
       "      <td>116.344327,23.537765;116.344349,23.537865</td>\n",
       "      <td>西环城路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>169</td>\n",
       "      <td>135</td>\n",
       "      <td>沿淡浦路向北步行169米左转</td>\n",
       "      <td>北</td>\n",
       "      <td>116.344349,23.537865;116.344323,23.538012;116....</td>\n",
       "      <td>淡浦路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>551</td>\n",
       "      <td>441</td>\n",
       "      <td>沿西关路向西北步行551米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.344679,23.539349;116.344601,23.539501;116....</td>\n",
       "      <td>西关路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>44</td>\n",
       "      <td>35</td>\n",
       "      <td>沿南社路向西南步行44米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.339766,23.541302;116.339557,23.540951</td>\n",
       "      <td>南社路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>164</td>\n",
       "      <td>131</td>\n",
       "      <td>沿朝阳路向南步行164米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.339553,23.540946;116.339497,23.54072;116.3...</td>\n",
       "      <td>朝阳路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>115</td>\n",
       "      <td>92</td>\n",
       "      <td>沿磐福路向西步行115米向右前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.339362,23.539462;116.338815,23.539484;116....</td>\n",
       "      <td>磐福路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>950</td>\n",
       "      <td>760</td>\n",
       "      <td>沿磐福路向西步行950米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.338238,23.539462;116.33796,23.539501;116.3...</td>\n",
       "      <td>磐福路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1270</td>\n",
       "      <td>1016</td>\n",
       "      <td>沿环市西路向南步行1270米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.328932,23.540178;116.328906,23.539839;116....</td>\n",
       "      <td>环市西路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>332</td>\n",
       "      <td>266</td>\n",
       "      <td>沿望江南路西向西步行332米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.327934,23.528689;116.327808,23.528668;116....</td>\n",
       "      <td>望江南路西</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>702</td>\n",
       "      <td>562</td>\n",
       "      <td>向南步行702米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.324687,23.528811;116.324648,23.526233;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>2168</td>\n",
       "      <td>1734</td>\n",
       "      <td>沿梅二路向西步行2168米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.324028,23.522604;116.323572,23.522574;116....</td>\n",
       "      <td>梅二路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>450</td>\n",
       "      <td>360</td>\n",
       "      <td>沿圩场路向南步行450米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.303702,23.517244;116.303754,23.514978;116....</td>\n",
       "      <td>圩场路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>1842</td>\n",
       "      <td>1474</td>\n",
       "      <td>沿吉荣路向西步行1842米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.303815,23.513164;116.303494,23.513164;116....</td>\n",
       "      <td>吉荣路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>2061</td>\n",
       "      <td>1649</td>\n",
       "      <td>沿205县道向西南步行2061米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.28691,23.507843;116.285091,23.507088;116.2...</td>\n",
       "      <td>205县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>538</td>\n",
       "      <td>430</td>\n",
       "      <td>沿108县道向西南步行538米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.271185,23.497053;116.27112,23.496953;116.2...</td>\n",
       "      <td>108县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>405</td>\n",
       "      <td>324</td>\n",
       "      <td>沿逢春路向西南步行405米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.268446,23.492904;116.268268,23.492478;116....</td>\n",
       "      <td>逢春路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>258</td>\n",
       "      <td>206</td>\n",
       "      <td>沿厚德路向西南步行258米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.266554,23.489679;116.266389,23.489427;116....</td>\n",
       "      <td>厚德路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>957</td>\n",
       "      <td>766</td>\n",
       "      <td>沿108县道向西南步行957米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.264592,23.488338;116.264275,23.488203;116....</td>\n",
       "      <td>108县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>893</td>\n",
       "      <td>714</td>\n",
       "      <td>沿108县道向西步行893米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.256458,23.484128;116.254549,23.484635;116....</td>\n",
       "      <td>108县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>286</td>\n",
       "      <td>229</td>\n",
       "      <td>沿钟玉路向西步行286米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.247951,23.485968;116.246102,23.486128;116....</td>\n",
       "      <td>钟玉路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1769</td>\n",
       "      <td>1415</td>\n",
       "      <td>沿108县道向西步行1769米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.245152,23.486233;116.24418,23.486311;116.2...</td>\n",
       "      <td>108县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>330</td>\n",
       "      <td>264</td>\n",
       "      <td>向南步行330米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.228889,23.490569;116.228785,23.490356;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>3219</td>\n",
       "      <td>2575</td>\n",
       "      <td>沿330乡道向西南步行3219米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.227791,23.487765;116.227665,23.487756;116....</td>\n",
       "      <td>330乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>520</td>\n",
       "      <td>416</td>\n",
       "      <td>沿331乡道向西南步行520米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.204848,23.471267;116.204301,23.471493;116....</td>\n",
       "      <td>331乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>803</td>\n",
       "      <td>642</td>\n",
       "      <td>沿331乡道向西南步行803米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.201011,23.469301;116.20023,23.46918;116.19...</td>\n",
       "      <td>331乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>503</td>\n",
       "      <td>402</td>\n",
       "      <td>向西南步行503米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.193924,23.466437;116.193529,23.466311;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>830</td>\n",
       "      <td>664</td>\n",
       "      <td>向西步行830米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.191068,23.463611;116.190716,23.463576;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>286</td>\n",
       "      <td>229</td>\n",
       "      <td>向西南步行286米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.182943,23.463403;116.182804,23.463142;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1597</td>\n",
       "      <td>1278</td>\n",
       "      <td>向西南步行1597米左转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.18112,23.461484;116.180208,23.461233;116.1...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>38</td>\n",
       "      <td>30</td>\n",
       "      <td>沿329乡道向南步行38米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.16776,23.45576;116.167843,23.455425</td>\n",
       "      <td>329乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>172</td>\n",
       "      <td>138</td>\n",
       "      <td>向西步行172米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.167843,23.455421;116.166194,23.455095</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>236</td>\n",
       "      <td>189</td>\n",
       "      <td>向南步行236米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.166189,23.455091;116.166155,23.454735;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1172</td>\n",
       "      <td>938</td>\n",
       "      <td>向西南步行1172米左转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.165768,23.452995;116.165499,23.452908;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1014</td>\n",
       "      <td>811</td>\n",
       "      <td>向西南步行1014米左转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.15566,23.448242;116.156224,23.446905;116.1...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>296</td>\n",
       "      <td>237</td>\n",
       "      <td>沿棉湖大道中段向南步行296米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.149909,23.443103;116.149852,23.442331;116....</td>\n",
       "      <td>棉湖大道中段</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>528</td>\n",
       "      <td>422</td>\n",
       "      <td>沿道江东路向西步行528米向右前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.149831,23.44043;116.149692,23.440456;116.1...</td>\n",
       "      <td>道江东路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>步行12米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.144987,23.442118;116.144961,23.442148;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>110</td>\n",
       "      <td>88</td>\n",
       "      <td>沿解放路向西北步行110米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.144878,23.442127;116.143902,23.442539</td>\n",
       "      <td>解放路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>252</td>\n",
       "      <td>202</td>\n",
       "      <td>向西南步行252米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.143898,23.442539;116.14365,23.442092;116.1...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>[]</td>\n",
       "      <td>到达目的地</td>\n",
       "      <td>59</td>\n",
       "      <td>47</td>\n",
       "      <td>向西北步行59米到达目的地</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.142483,23.440668;116.142031,23.441003</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    action assistant_action distance duration            instruction  \\\n",
       "0       右转               []       67       54             向西北步行67米右转   \n",
       "1       左转               []      185      148            向西北步行185米左转   \n",
       "2       直行               []      735      588        沿淡浦路向西南步行735米直行   \n",
       "3       右转               []      110       88        沿西环城路向南步行110米右转   \n",
       "4       右转               []       12       10                步行12米右转   \n",
       "5       []               []       10        8           沿西环城路向北步行10米   \n",
       "6       左转               []      169      135         沿淡浦路向北步行169米左转   \n",
       "7       左转               []      551      441        沿西关路向西北步行551米左转   \n",
       "8       直行               []       44       35         沿南社路向西南步行44米直行   \n",
       "9       右转               []      164      131         沿朝阳路向南步行164米右转   \n",
       "10  向右前方行走               []      115       92     沿磐福路向西步行115米向右前方行走   \n",
       "11      左转               []      950      760         沿磐福路向西步行950米左转   \n",
       "12      右转               []     1270     1016       沿环市西路向南步行1270米右转   \n",
       "13      左转               []      332      266       沿望江南路西向西步行332米左转   \n",
       "14      右转               []      702      562             向南步行702米右转   \n",
       "15      左转               []     2168     1734        沿梅二路向西步行2168米左转   \n",
       "16      右转               []      450      360         沿圩场路向南步行450米右转   \n",
       "17      直行               []     1842     1474        沿吉荣路向西步行1842米直行   \n",
       "18      直行               []     2061     1649     沿205县道向西南步行2061米直行   \n",
       "19      直行               []      538      430      沿108县道向西南步行538米直行   \n",
       "20      直行               []      405      324        沿逢春路向西南步行405米直行   \n",
       "21      直行               []      258      206        沿厚德路向西南步行258米直行   \n",
       "22  向右前方行走               []      957      766  沿108县道向西南步行957米向右前方行走   \n",
       "23      直行               []      893      714       沿108县道向西步行893米直行   \n",
       "24      直行               []      286      229         沿钟玉路向西步行286米直行   \n",
       "25      左转               []     1769     1415      沿108县道向西步行1769米左转   \n",
       "26      右转               []      330      264             向南步行330米右转   \n",
       "27      右转               []     3219     2575     沿330乡道向西南步行3219米右转   \n",
       "28  向右前方行走               []      520      416  沿331乡道向西南步行520米向右前方行走   \n",
       "29  向右前方行走               []      803      642  沿331乡道向西南步行803米向右前方行走   \n",
       "30      右转               []      503      402            向西南步行503米右转   \n",
       "31      左转               []      830      664             向西步行830米左转   \n",
       "32  向右前方行走               []      286      229        向西南步行286米向右前方行走   \n",
       "33      左转               []     1597     1278           向西南步行1597米左转   \n",
       "34      右转               []       38       30        沿329乡道向南步行38米右转   \n",
       "35      左转               []      172      138             向西步行172米左转   \n",
       "36      右转               []      236      189             向南步行236米右转   \n",
       "37      左转               []     1172      938           向西南步行1172米左转   \n",
       "38      左转               []     1014      811           向西南步行1014米左转   \n",
       "39      右转               []      296      237      沿棉湖大道中段向南步行296米右转   \n",
       "40  向右前方行走               []      528      422    沿道江东路向西步行528米向右前方行走   \n",
       "41      右转               []       12       10                步行12米右转   \n",
       "42      左转               []      110       88        沿解放路向西北步行110米左转   \n",
       "43      右转               []      252      202            向西南步行252米右转   \n",
       "44      []            到达目的地       59       47          向西北步行59米到达目的地   \n",
       "\n",
       "   orientation                                           polyline    road  \\\n",
       "0           西北          116.349918,23.543537;116.349323,23.543789      []   \n",
       "1           西北  116.349319,23.543789;116.349379,23.543919;116....      []   \n",
       "2           西南  116.347921,23.544601;116.347743,23.544206;116....     淡浦路   \n",
       "3            南  116.344657,23.53872;116.34447,23.537808;116.34...    西环城路   \n",
       "4           []           116.34444,23.537734;116.344332,23.537765      []   \n",
       "5            北          116.344327,23.537765;116.344349,23.537865    西环城路   \n",
       "6            北  116.344349,23.537865;116.344323,23.538012;116....     淡浦路   \n",
       "7           西北  116.344679,23.539349;116.344601,23.539501;116....     西关路   \n",
       "8           西南          116.339766,23.541302;116.339557,23.540951     南社路   \n",
       "9            南  116.339553,23.540946;116.339497,23.54072;116.3...     朝阳路   \n",
       "10           西  116.339362,23.539462;116.338815,23.539484;116....     磐福路   \n",
       "11           西  116.338238,23.539462;116.33796,23.539501;116.3...     磐福路   \n",
       "12           南  116.328932,23.540178;116.328906,23.539839;116....    环市西路   \n",
       "13           西  116.327934,23.528689;116.327808,23.528668;116....   望江南路西   \n",
       "14           南  116.324687,23.528811;116.324648,23.526233;116....      []   \n",
       "15           西  116.324028,23.522604;116.323572,23.522574;116....     梅二路   \n",
       "16           南  116.303702,23.517244;116.303754,23.514978;116....     圩场路   \n",
       "17           西  116.303815,23.513164;116.303494,23.513164;116....     吉荣路   \n",
       "18          西南  116.28691,23.507843;116.285091,23.507088;116.2...   205县道   \n",
       "19          西南  116.271185,23.497053;116.27112,23.496953;116.2...   108县道   \n",
       "20          西南  116.268446,23.492904;116.268268,23.492478;116....     逢春路   \n",
       "21          西南  116.266554,23.489679;116.266389,23.489427;116....     厚德路   \n",
       "22          西南  116.264592,23.488338;116.264275,23.488203;116....   108县道   \n",
       "23           西  116.256458,23.484128;116.254549,23.484635;116....   108县道   \n",
       "24           西  116.247951,23.485968;116.246102,23.486128;116....     钟玉路   \n",
       "25           西  116.245152,23.486233;116.24418,23.486311;116.2...   108县道   \n",
       "26           南  116.228889,23.490569;116.228785,23.490356;116....      []   \n",
       "27          西南  116.227791,23.487765;116.227665,23.487756;116....   330乡道   \n",
       "28          西南  116.204848,23.471267;116.204301,23.471493;116....   331乡道   \n",
       "29          西南  116.201011,23.469301;116.20023,23.46918;116.19...   331乡道   \n",
       "30          西南  116.193924,23.466437;116.193529,23.466311;116....      []   \n",
       "31           西  116.191068,23.463611;116.190716,23.463576;116....      []   \n",
       "32          西南  116.182943,23.463403;116.182804,23.463142;116....      []   \n",
       "33          西南  116.18112,23.461484;116.180208,23.461233;116.1...      []   \n",
       "34           南            116.16776,23.45576;116.167843,23.455425   329乡道   \n",
       "35           西          116.167843,23.455421;116.166194,23.455095      []   \n",
       "36           南  116.166189,23.455091;116.166155,23.454735;116....      []   \n",
       "37          西南  116.165768,23.452995;116.165499,23.452908;116....      []   \n",
       "38          西南  116.15566,23.448242;116.156224,23.446905;116.1...      []   \n",
       "39           南  116.149909,23.443103;116.149852,23.442331;116....  棉湖大道中段   \n",
       "40           西  116.149831,23.44043;116.149692,23.440456;116.1...    道江东路   \n",
       "41          []  116.144987,23.442118;116.144961,23.442148;116....      []   \n",
       "42          西北          116.144878,23.442127;116.143902,23.442539     解放路   \n",
       "43          西南  116.143898,23.442539;116.14365,23.442092;116.1...      []   \n",
       "44          西北          116.142483,23.440668;116.142031,23.441003      []   \n",
       "\n",
       "   walk_type  \n",
       "0          0  \n",
       "1          0  \n",
       "2          0  \n",
       "3          0  \n",
       "4          1  \n",
       "5          0  \n",
       "6          0  \n",
       "7          0  \n",
       "8          0  \n",
       "9          0  \n",
       "10         0  \n",
       "11         0  \n",
       "12         0  \n",
       "13         0  \n",
       "14         0  \n",
       "15         0  \n",
       "16         0  \n",
       "17         0  \n",
       "18         0  \n",
       "19         0  \n",
       "20         0  \n",
       "21         0  \n",
       "22         0  \n",
       "23         0  \n",
       "24         0  \n",
       "25         0  \n",
       "26         0  \n",
       "27         0  \n",
       "28         0  \n",
       "29         0  \n",
       "30         0  \n",
       "31         0  \n",
       "32         0  \n",
       "33         0  \n",
       "34         0  \n",
       "35         0  \n",
       "36         0  \n",
       "37         0  \n",
       "38         0  \n",
       "39         0  \n",
       "40         0  \n",
       "41         0  \n",
       "42         0  \n",
       "43         0  \n",
       "44         0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0                向西北步行67米右转\n",
       "1               向西北步行185米左转\n",
       "2           沿淡浦路向西南步行735米直行\n",
       "3           沿西环城路向南步行110米右转\n",
       "4                   步行12米右转\n",
       "5              沿西环城路向北步行10米\n",
       "6            沿淡浦路向北步行169米左转\n",
       "7           沿西关路向西北步行551米左转\n",
       "8            沿南社路向西南步行44米直行\n",
       "9            沿朝阳路向南步行164米右转\n",
       "10       沿磐福路向西步行115米向右前方行走\n",
       "11           沿磐福路向西步行950米左转\n",
       "12         沿环市西路向南步行1270米右转\n",
       "13         沿望江南路西向西步行332米左转\n",
       "14               向南步行702米右转\n",
       "15          沿梅二路向西步行2168米左转\n",
       "16           沿圩场路向南步行450米右转\n",
       "17          沿吉荣路向西步行1842米直行\n",
       "18       沿205县道向西南步行2061米直行\n",
       "19        沿108县道向西南步行538米直行\n",
       "20          沿逢春路向西南步行405米直行\n",
       "21          沿厚德路向西南步行258米直行\n",
       "22    沿108县道向西南步行957米向右前方行走\n",
       "23         沿108县道向西步行893米直行\n",
       "24           沿钟玉路向西步行286米直行\n",
       "25        沿108县道向西步行1769米左转\n",
       "26               向南步行330米右转\n",
       "27       沿330乡道向西南步行3219米右转\n",
       "28    沿331乡道向西南步行520米向右前方行走\n",
       "29    沿331乡道向西南步行803米向右前方行走\n",
       "30              向西南步行503米右转\n",
       "31               向西步行830米左转\n",
       "32          向西南步行286米向右前方行走\n",
       "33             向西南步行1597米左转\n",
       "34          沿329乡道向南步行38米右转\n",
       "35               向西步行172米左转\n",
       "36               向南步行236米右转\n",
       "37             向西南步行1172米左转\n",
       "38             向西南步行1014米左转\n",
       "39        沿棉湖大道中段向南步行296米右转\n",
       "40      沿道江东路向西步行528米向右前方行走\n",
       "41                  步行12米右转\n",
       "42          沿解放路向西北步行110米左转\n",
       "43              向西南步行252米右转\n",
       "44            向西北步行59米到达目的地\n",
       "Name: instruction, dtype: object"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "一中_湖滨居委会 = walking(揭阳一中_location,湖滨居委会_location)\n",
    "df_步行路径规划 = pd.io.json.json_normalize(一中_湖滨居委会[\"route\"][\"paths\"][0]['steps'])\n",
    "display(df_步行路径规划)\n",
    "df_步行路径规划[\"instruction\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 尝试不同的walk_type，成功之后返回一段walk_type =30的轮渡旅程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(起点)南澳岛龙珠寺_location: 117.062832,23.434297 (终点)湖滨居委会_location: 116.141873,23.440937\n"
     ]
    }
   ],
   "source": [
    "南澳岛龙珠寺 = geocode('广东省汕头市南澳岛生态旅游区龙珠寺')\n",
    "南澳岛龙珠寺\n",
    "# 输入新地址，新建地理编码\n",
    "南澳岛龙珠寺_location = 南澳岛龙珠寺['geocodes'][0]['location']\n",
    "湖滨居委会 = geocode('广东省揭阳市揭西县棉湖镇湖滨居委会')\n",
    "湖滨居委会\n",
    "# 输入新地址，新建地理编码\n",
    "湖滨居委会_location = 湖滨居委会['geocodes'][0]['location']\n",
    "print(\"(起点)南澳岛龙珠寺_location:\",南澳岛龙珠寺_location,\"(终点)湖滨居委会_location:\",湖滨居委会_location)\n",
    "# 将新地址设置为起点和终点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>action</th>\n",
       "      <th>assistant_action</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>instruction</th>\n",
       "      <th>orientation</th>\n",
       "      <th>polyline</th>\n",
       "      <th>road</th>\n",
       "      <th>walk_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>向左后方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>2375</td>\n",
       "      <td>1900</td>\n",
       "      <td>沿057县道向西步行2375米向左后方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>117.062834,23.434332;117.062609,23.434345;117....</td>\n",
       "      <td>057县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>72</td>\n",
       "      <td>58</td>\n",
       "      <td>步行72米向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.04602,23.430443;117.045955,23.430321;117.0...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>714</td>\n",
       "      <td>571</td>\n",
       "      <td>步行714米向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.04589,23.429809;117.045807,23.429722;117.0...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>357</td>\n",
       "      <td>286</td>\n",
       "      <td>步行357米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.03947,23.427548;117.038524,23.427153;117.0...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>30</td>\n",
       "      <td>24</td>\n",
       "      <td>向西步行30米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>117.036315,23.426224;117.036042,23.426324</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>683</td>\n",
       "      <td>546</td>\n",
       "      <td>沿环城东路向南步行683米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>117.036037,23.426324;117.035938,23.424115;117....</td>\n",
       "      <td>环城东路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>250</td>\n",
       "      <td>200</td>\n",
       "      <td>沿崇文路向西步行250米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>117.03572,23.42013;117.035638,23.420139;117.03...</td>\n",
       "      <td>崇文路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>666</td>\n",
       "      <td>533</td>\n",
       "      <td>沿崇文路向西南步行666米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>117.033264,23.420286;117.032435,23.419249;117....</td>\n",
       "      <td>崇文路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1947</td>\n",
       "      <td>1558</td>\n",
       "      <td>沿海滨路向西步行1947米</td>\n",
       "      <td>西</td>\n",
       "      <td>117.030013,23.415139;117.029536,23.415339;117....</td>\n",
       "      <td>海滨路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>66</td>\n",
       "      <td>53</td>\n",
       "      <td>沿海滨路向西南步行66米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>117.01181,23.417569;117.011667,23.41753;117.01...</td>\n",
       "      <td>海滨路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>28</td>\n",
       "      <td>22</td>\n",
       "      <td>步行28米左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.011237,23.417283;117.01099,23.417405</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>42</td>\n",
       "      <td>34</td>\n",
       "      <td>沿海滨路步行42米向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.010985,23.417405;117.010959,23.417296;117....</td>\n",
       "      <td>海滨路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>1771</td>\n",
       "      <td>1417</td>\n",
       "      <td>沿海滨路向西步行1771米向左前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>117.010838,23.417044;117.010156,23.416649;117....</td>\n",
       "      <td>海滨路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1084</td>\n",
       "      <td>867</td>\n",
       "      <td>沿336省道向西步行1084米右转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.99513,23.418941;116.99513,23.418815;116.99...</td>\n",
       "      <td>336省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>371</td>\n",
       "      <td>297</td>\n",
       "      <td>步行371米左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.986797,23.416897;116.986515,23.417331;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>180</td>\n",
       "      <td>144</td>\n",
       "      <td>步行180米向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.984913,23.419766;116.983164,23.419605</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>298</td>\n",
       "      <td>238</td>\n",
       "      <td>步行298米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.98316,23.419601;116.983116,23.419579;116.9...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>2529</td>\n",
       "      <td>2023</td>\n",
       "      <td>步行2529米</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.98033,23.419245;116.978533,23.419245;116.9...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1095</td>\n",
       "      <td>876</td>\n",
       "      <td>步行1095米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.956649,23.424831;116.95395,23.425816;116.9...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>向左后方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>287</td>\n",
       "      <td>230</td>\n",
       "      <td>步行287米向左后方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.946766,23.428255;116.946749,23.428468;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>15</td>\n",
       "      <td>12</td>\n",
       "      <td>沿336省道向西步行15米右转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.946502,23.430456;116.946367,23.430417</td>\n",
       "      <td>336省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>102</td>\n",
       "      <td>82</td>\n",
       "      <td>向东北步行102米左转</td>\n",
       "      <td>东北</td>\n",
       "      <td>116.946363,23.430412;116.946354,23.43046;116.9...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>65</td>\n",
       "      <td>52</td>\n",
       "      <td>向西北步行65米直行</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.947027,23.431024;116.946489,23.431354</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>9554</td>\n",
       "      <td>7643</td>\n",
       "      <td>向西步行9554米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.946484,23.431354;116.945977,23.431636;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>99</td>\n",
       "      <td>79</td>\n",
       "      <td>向东步行99米左转</td>\n",
       "      <td>东</td>\n",
       "      <td>116.863242,23.412157;116.864201,23.412309</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>1437</td>\n",
       "      <td>1150</td>\n",
       "      <td>沿336省道向西北步行1437米向左前方行走</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.864201,23.412309;116.864115,23.412604;116....</td>\n",
       "      <td>336省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>66</td>\n",
       "      <td>53</td>\n",
       "      <td>沿336省道向西步行66米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.85681,23.422335;116.856723,23.422339;116.8...</td>\n",
       "      <td>336省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>2022</td>\n",
       "      <td>1618</td>\n",
       "      <td>沿莱美路向西步行2022米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.856159,23.422374;116.855065,23.422465;116....</td>\n",
       "      <td>莱美路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>4513</td>\n",
       "      <td>3610</td>\n",
       "      <td>沿539国道向西步行4513米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.837691,23.428793;116.837374,23.429019;116....</td>\n",
       "      <td>539国道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>2182</td>\n",
       "      <td>1746</td>\n",
       "      <td>沿莱美路向西北步行2182米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.795881,23.441003;116.794705,23.441502;116....</td>\n",
       "      <td>莱美路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>66</td>\n",
       "      <td>53</td>\n",
       "      <td>沿763乡道向西步行66米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.502478,23.445386;116.502018,23.445543;116....</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>64</td>\n",
       "      <td>51</td>\n",
       "      <td>沿763乡道向西南步行64米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.501875,23.445608;116.501476,23.445321;116....</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>向左前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>272</td>\n",
       "      <td>218</td>\n",
       "      <td>沿763乡道向西步行272米向左前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.501363,23.445265;116.501263,23.44526;116.5...</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>250</td>\n",
       "      <td>200</td>\n",
       "      <td>沿763乡道向南步行250米右转</td>\n",
       "      <td>南</td>\n",
       "      <td>116.498863,23.44477;116.498837,23.444718;116.4...</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>340</td>\n",
       "      <td>272</td>\n",
       "      <td>沿763乡道向西步行340米向右前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.498503,23.442552;116.497483,23.442656;116....</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>899</td>\n",
       "      <td>719</td>\n",
       "      <td>沿763乡道向西步行899米直行</td>\n",
       "      <td>西</td>\n",
       "      <td>116.495221,23.44263;116.495104,23.44263;116.49...</td>\n",
       "      <td>763乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1795</td>\n",
       "      <td>1436</td>\n",
       "      <td>沿095县道向西步行1795米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.486454,23.442899;116.485933,23.442917;116....</td>\n",
       "      <td>095县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>104</td>\n",
       "      <td>83</td>\n",
       "      <td>沿095县道向西南步行104米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.469883,23.440208;116.469761,23.440195;116....</td>\n",
       "      <td>095县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>358</td>\n",
       "      <td>286</td>\n",
       "      <td>向西南步行358米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.469253,23.439531;116.468212,23.438394;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>90</td>\n",
       "      <td>72</td>\n",
       "      <td>沿095县道向西南步行90米左转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.466984,23.437049;116.466766,23.436823;116....</td>\n",
       "      <td>095县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>50</td>\n",
       "      <td>40</td>\n",
       "      <td>沿095县道向东南步行50米右转</td>\n",
       "      <td>东南</td>\n",
       "      <td>116.466415,23.436415;116.466758,23.436085</td>\n",
       "      <td>095县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>115</td>\n",
       "      <td>92</td>\n",
       "      <td>沿095县道向西南步行115米向右前方行走</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.466758,23.436081;116.466545,23.435907;116....</td>\n",
       "      <td>095县道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>23</td>\n",
       "      <td>18</td>\n",
       "      <td>沿关金路港底路段向西步行23米向右前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.465842,23.435473;116.465616,23.435482</td>\n",
       "      <td>关金路港底路段</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>12333</td>\n",
       "      <td>9866</td>\n",
       "      <td>向西步行12333米右转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.465612,23.435482;116.465282,23.435642;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1662</td>\n",
       "      <td>1330</td>\n",
       "      <td>沿234省道向北步行1662米左转</td>\n",
       "      <td>北</td>\n",
       "      <td>116.35365,23.467287;116.353329,23.467873;116.3...</td>\n",
       "      <td>234省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>394</td>\n",
       "      <td>315</td>\n",
       "      <td>沿932乡道向西步行394米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.348989,23.481693;116.348941,23.481693;116....</td>\n",
       "      <td>932乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>52</td>\n",
       "      <td>42</td>\n",
       "      <td>沿932乡道向南步行52米向右前方行走</td>\n",
       "      <td>南</td>\n",
       "      <td>116.345165,23.481489;116.345165,23.481424;116....</td>\n",
       "      <td>932乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>1666</td>\n",
       "      <td>1333</td>\n",
       "      <td>沿932乡道向西步行1666米左转</td>\n",
       "      <td>西</td>\n",
       "      <td>116.344991,23.481042;116.344631,23.480894;116....</td>\n",
       "      <td>932乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>11294</td>\n",
       "      <td>9035</td>\n",
       "      <td>沿236省道向西南步行11294米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.32957,23.482101;116.328767,23.481398;116.3...</td>\n",
       "      <td>236省道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>沿399乡道向西北步行12米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.229805,23.442231;116.229709,23.4423</td>\n",
       "      <td>399乡道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>909</td>\n",
       "      <td>727</td>\n",
       "      <td>沿洪阳大道向西南步行909米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.229705,23.4423;116.229288,23.442027;116.22...</td>\n",
       "      <td>洪阳大道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>198</td>\n",
       "      <td>158</td>\n",
       "      <td>沿新兴南路向西南步行198米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.223064,23.436801;116.221957,23.435868;116....</td>\n",
       "      <td>新兴南路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>462</td>\n",
       "      <td>370</td>\n",
       "      <td>向西南步行462米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.221623,23.435586;116.221315,23.435321;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>直行</td>\n",
       "      <td>[]</td>\n",
       "      <td>136</td>\n",
       "      <td>109</td>\n",
       "      <td>向西南步行136米直行</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.218372,23.432648;116.21809,23.432361;116.2...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>120</td>\n",
       "      <td>96</td>\n",
       "      <td>沿洪阳大道向西南步行120米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.217543,23.431675;116.216966,23.430738</td>\n",
       "      <td>洪阳大道</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>向右前方行走</td>\n",
       "      <td>[]</td>\n",
       "      <td>7489</td>\n",
       "      <td>5991</td>\n",
       "      <td>沿道江东路向西步行7489米向右前方行走</td>\n",
       "      <td>西</td>\n",
       "      <td>116.216962,23.430734;116.216766,23.430768;116....</td>\n",
       "      <td>道江东路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>步行12米右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.144987,23.442118;116.144961,23.442148;116....</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>左转</td>\n",
       "      <td>[]</td>\n",
       "      <td>110</td>\n",
       "      <td>88</td>\n",
       "      <td>沿解放路向西北步行110米左转</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.144878,23.442127;116.143902,23.442539</td>\n",
       "      <td>解放路</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>右转</td>\n",
       "      <td>[]</td>\n",
       "      <td>252</td>\n",
       "      <td>202</td>\n",
       "      <td>向西南步行252米右转</td>\n",
       "      <td>西南</td>\n",
       "      <td>116.143898,23.442539;116.14365,23.442092;116.1...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>[]</td>\n",
       "      <td>到达目的地</td>\n",
       "      <td>59</td>\n",
       "      <td>47</td>\n",
       "      <td>向西北步行59米到达目的地</td>\n",
       "      <td>西北</td>\n",
       "      <td>116.142483,23.440668;116.142031,23.441003</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>87 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    action assistant_action distance duration             instruction  \\\n",
       "0   向左后方行走               []     2375     1900   沿057县道向西步行2375米向左后方行走   \n",
       "1   向右前方行走               []       72       58             步行72米向右前方行走   \n",
       "2   向左前方行走               []      714      571            步行714米向左前方行走   \n",
       "3       右转               []      357      286                步行357米右转   \n",
       "4       左转               []       30       24               向西步行30米左转   \n",
       "5       右转               []      683      546         沿环城东路向南步行683米右转   \n",
       "6       左转               []      250      200          沿崇文路向西步行250米左转   \n",
       "7       右转               []      666      533         沿崇文路向西南步行666米右转   \n",
       "8       []               []     1947     1558           沿海滨路向西步行1947米   \n",
       "9   向右前方行走               []       66       53      沿海滨路向西南步行66米向右前方行走   \n",
       "10      左转               []       28       22                 步行28米左转   \n",
       "11  向右前方行走               []       42       34         沿海滨路步行42米向右前方行走   \n",
       "12  向左前方行走               []     1771     1417     沿海滨路向西步行1771米向左前方行走   \n",
       "13      右转               []     1084      867       沿336省道向西步行1084米右转   \n",
       "14      左转               []      371      297                步行371米左转   \n",
       "15  向左前方行走               []      180      144            步行180米向左前方行走   \n",
       "16      右转               []      298      238                步行298米右转   \n",
       "17      []               []     2529     2023                 步行2529米   \n",
       "18      右转               []     1095      876               步行1095米右转   \n",
       "19  向左后方行走               []      287      230            步行287米向左后方行走   \n",
       "20      右转               []       15       12         沿336省道向西步行15米右转   \n",
       "21      左转               []      102       82             向东北步行102米左转   \n",
       "22      直行               []       65       52              向西北步行65米直行   \n",
       "23      直行               []     9554     7643             向西步行9554米直行   \n",
       "24      左转               []       99       79               向东步行99米左转   \n",
       "25  向左前方行走               []     1437     1150  沿336省道向西北步行1437米向左前方行走   \n",
       "26      直行               []       66       53         沿336省道向西步行66米直行   \n",
       "27      直行               []     2022     1618         沿莱美路向西步行2022米直行   \n",
       "28      直行               []     4513     3610       沿539国道向西步行4513米直行   \n",
       "29      左转               []     2182     1746        沿莱美路向西北步行2182米左转   \n",
       "..     ...              ...      ...      ...                     ...   \n",
       "57      左转               []       66       53         沿763乡道向西步行66米左转   \n",
       "58  向右前方行走               []       64       51    沿763乡道向西南步行64米向右前方行走   \n",
       "59  向左前方行走               []      272      218    沿763乡道向西步行272米向左前方行走   \n",
       "60      右转               []      250      200        沿763乡道向南步行250米右转   \n",
       "61  向右前方行走               []      340      272    沿763乡道向西步行340米向右前方行走   \n",
       "62      直行               []      899      719        沿763乡道向西步行899米直行   \n",
       "63      左转               []     1795     1436       沿095县道向西步行1795米左转   \n",
       "64      直行               []      104       83       沿095县道向西南步行104米直行   \n",
       "65      直行               []      358      286             向西南步行358米直行   \n",
       "66      左转               []       90       72        沿095县道向西南步行90米左转   \n",
       "67      右转               []       50       40        沿095县道向东南步行50米右转   \n",
       "68  向右前方行走               []      115       92   沿095县道向西南步行115米向右前方行走   \n",
       "69  向右前方行走               []       23       18   沿关金路港底路段向西步行23米向右前方行走   \n",
       "70      右转               []    12333     9866            向西步行12333米右转   \n",
       "71      左转               []     1662     1330       沿234省道向北步行1662米左转   \n",
       "72      左转               []      394      315        沿932乡道向西步行394米左转   \n",
       "73  向右前方行走               []       52       42     沿932乡道向南步行52米向右前方行走   \n",
       "74      左转               []     1666     1333       沿932乡道向西步行1666米左转   \n",
       "75      右转               []    11294     9035     沿236省道向西南步行11294米右转   \n",
       "76      左转               []       12       10        沿399乡道向西北步行12米左转   \n",
       "77      直行               []      909      727        沿洪阳大道向西南步行909米直行   \n",
       "78      直行               []      198      158        沿新兴南路向西南步行198米直行   \n",
       "79      直行               []      462      370             向西南步行462米直行   \n",
       "80      直行               []      136      109             向西南步行136米直行   \n",
       "81      右转               []      120       96        沿洪阳大道向西南步行120米右转   \n",
       "82  向右前方行走               []     7489     5991    沿道江东路向西步行7489米向右前方行走   \n",
       "83      右转               []       12       10                 步行12米右转   \n",
       "84      左转               []      110       88         沿解放路向西北步行110米左转   \n",
       "85      右转               []      252      202             向西南步行252米右转   \n",
       "86      []            到达目的地       59       47           向西北步行59米到达目的地   \n",
       "\n",
       "   orientation                                           polyline     road  \\\n",
       "0            西  117.062834,23.434332;117.062609,23.434345;117....    057县道   \n",
       "1           []  117.04602,23.430443;117.045955,23.430321;117.0...       []   \n",
       "2           []  117.04589,23.429809;117.045807,23.429722;117.0...       []   \n",
       "3           []  117.03947,23.427548;117.038524,23.427153;117.0...       []   \n",
       "4            西          117.036315,23.426224;117.036042,23.426324       []   \n",
       "5            南  117.036037,23.426324;117.035938,23.424115;117....     环城东路   \n",
       "6            西  117.03572,23.42013;117.035638,23.420139;117.03...      崇文路   \n",
       "7           西南  117.033264,23.420286;117.032435,23.419249;117....      崇文路   \n",
       "8            西  117.030013,23.415139;117.029536,23.415339;117....      海滨路   \n",
       "9           西南  117.01181,23.417569;117.011667,23.41753;117.01...      海滨路   \n",
       "10          []           117.011237,23.417283;117.01099,23.417405       []   \n",
       "11          []  117.010985,23.417405;117.010959,23.417296;117....      海滨路   \n",
       "12           西  117.010838,23.417044;117.010156,23.416649;117....      海滨路   \n",
       "13           西  116.99513,23.418941;116.99513,23.418815;116.99...    336省道   \n",
       "14          []  116.986797,23.416897;116.986515,23.417331;116....       []   \n",
       "15          []          116.984913,23.419766;116.983164,23.419605       []   \n",
       "16          []  116.98316,23.419601;116.983116,23.419579;116.9...       []   \n",
       "17          []  116.98033,23.419245;116.978533,23.419245;116.9...       []   \n",
       "18          []  116.956649,23.424831;116.95395,23.425816;116.9...       []   \n",
       "19          []  116.946766,23.428255;116.946749,23.428468;116....       []   \n",
       "20           西          116.946502,23.430456;116.946367,23.430417    336省道   \n",
       "21          东北  116.946363,23.430412;116.946354,23.43046;116.9...       []   \n",
       "22          西北          116.947027,23.431024;116.946489,23.431354       []   \n",
       "23           西  116.946484,23.431354;116.945977,23.431636;116....       []   \n",
       "24           东          116.863242,23.412157;116.864201,23.412309       []   \n",
       "25          西北  116.864201,23.412309;116.864115,23.412604;116....    336省道   \n",
       "26           西  116.85681,23.422335;116.856723,23.422339;116.8...    336省道   \n",
       "27           西  116.856159,23.422374;116.855065,23.422465;116....      莱美路   \n",
       "28           西  116.837691,23.428793;116.837374,23.429019;116....    539国道   \n",
       "29          西北  116.795881,23.441003;116.794705,23.441502;116....      莱美路   \n",
       "..         ...                                                ...      ...   \n",
       "57           西  116.502478,23.445386;116.502018,23.445543;116....    763乡道   \n",
       "58          西南  116.501875,23.445608;116.501476,23.445321;116....    763乡道   \n",
       "59           西  116.501363,23.445265;116.501263,23.44526;116.5...    763乡道   \n",
       "60           南  116.498863,23.44477;116.498837,23.444718;116.4...    763乡道   \n",
       "61           西  116.498503,23.442552;116.497483,23.442656;116....    763乡道   \n",
       "62           西  116.495221,23.44263;116.495104,23.44263;116.49...    763乡道   \n",
       "63           西  116.486454,23.442899;116.485933,23.442917;116....    095县道   \n",
       "64          西南  116.469883,23.440208;116.469761,23.440195;116....    095县道   \n",
       "65          西南  116.469253,23.439531;116.468212,23.438394;116....       []   \n",
       "66          西南  116.466984,23.437049;116.466766,23.436823;116....    095县道   \n",
       "67          东南          116.466415,23.436415;116.466758,23.436085    095县道   \n",
       "68          西南  116.466758,23.436081;116.466545,23.435907;116....    095县道   \n",
       "69           西          116.465842,23.435473;116.465616,23.435482  关金路港底路段   \n",
       "70           西  116.465612,23.435482;116.465282,23.435642;116....       []   \n",
       "71           北  116.35365,23.467287;116.353329,23.467873;116.3...    234省道   \n",
       "72           西  116.348989,23.481693;116.348941,23.481693;116....    932乡道   \n",
       "73           南  116.345165,23.481489;116.345165,23.481424;116....    932乡道   \n",
       "74           西  116.344991,23.481042;116.344631,23.480894;116....    932乡道   \n",
       "75          西南  116.32957,23.482101;116.328767,23.481398;116.3...    236省道   \n",
       "76          西北            116.229805,23.442231;116.229709,23.4423    399乡道   \n",
       "77          西南  116.229705,23.4423;116.229288,23.442027;116.22...     洪阳大道   \n",
       "78          西南  116.223064,23.436801;116.221957,23.435868;116....     新兴南路   \n",
       "79          西南  116.221623,23.435586;116.221315,23.435321;116....       []   \n",
       "80          西南  116.218372,23.432648;116.21809,23.432361;116.2...       []   \n",
       "81          西南          116.217543,23.431675;116.216966,23.430738     洪阳大道   \n",
       "82           西  116.216962,23.430734;116.216766,23.430768;116....     道江东路   \n",
       "83          []  116.144987,23.442118;116.144961,23.442148;116....       []   \n",
       "84          西北          116.144878,23.442127;116.143902,23.442539      解放路   \n",
       "85          西南  116.143898,23.442539;116.14365,23.442092;116.1...       []   \n",
       "86          西北          116.142483,23.440668;116.142031,23.441003       []   \n",
       "\n",
       "   walk_type  \n",
       "0          0  \n",
       "1          0  \n",
       "2          0  \n",
       "3          0  \n",
       "4          0  \n",
       "5          0  \n",
       "6          0  \n",
       "7          0  \n",
       "8          0  \n",
       "9          0  \n",
       "10         1  \n",
       "11         0  \n",
       "12         0  \n",
       "13         0  \n",
       "14         0  \n",
       "15         0  \n",
       "16         0  \n",
       "17         0  \n",
       "18         0  \n",
       "19         0  \n",
       "20         0  \n",
       "21         0  \n",
       "22         0  \n",
       "23        30  \n",
       "24         0  \n",
       "25         0  \n",
       "26         0  \n",
       "27         0  \n",
       "28         0  \n",
       "29         0  \n",
       "..       ...  \n",
       "57         0  \n",
       "58         0  \n",
       "59         0  \n",
       "60         0  \n",
       "61         0  \n",
       "62         0  \n",
       "63         0  \n",
       "64         0  \n",
       "65        30  \n",
       "66         0  \n",
       "67         0  \n",
       "68         0  \n",
       "69         0  \n",
       "70         0  \n",
       "71         0  \n",
       "72         0  \n",
       "73         0  \n",
       "74         0  \n",
       "75         0  \n",
       "76         0  \n",
       "77         0  \n",
       "78         0  \n",
       "79         0  \n",
       "80         0  \n",
       "81         0  \n",
       "82         0  \n",
       "83         0  \n",
       "84         0  \n",
       "85         0  \n",
       "86         0  \n",
       "\n",
       "[87 rows x 9 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0      沿057县道向西步行2375米向左后方行走\n",
       "1                步行72米向右前方行走\n",
       "2               步行714米向左前方行走\n",
       "3                   步行357米右转\n",
       "4                  向西步行30米左转\n",
       "5            沿环城东路向南步行683米右转\n",
       "6             沿崇文路向西步行250米左转\n",
       "7            沿崇文路向西南步行666米右转\n",
       "8              沿海滨路向西步行1947米\n",
       "9         沿海滨路向西南步行66米向右前方行走\n",
       "10                   步行28米左转\n",
       "11           沿海滨路步行42米向右前方行走\n",
       "12       沿海滨路向西步行1771米向左前方行走\n",
       "13         沿336省道向西步行1084米右转\n",
       "14                  步行371米左转\n",
       "15              步行180米向左前方行走\n",
       "16                  步行298米右转\n",
       "17                   步行2529米\n",
       "18                 步行1095米右转\n",
       "19              步行287米向左后方行走\n",
       "20           沿336省道向西步行15米右转\n",
       "21               向东北步行102米左转\n",
       "22                向西北步行65米直行\n",
       "23               向西步行9554米直行\n",
       "24                 向东步行99米左转\n",
       "25    沿336省道向西北步行1437米向左前方行走\n",
       "26           沿336省道向西步行66米直行\n",
       "27           沿莱美路向西步行2022米直行\n",
       "28         沿539国道向西步行4513米直行\n",
       "29          沿莱美路向西北步行2182米左转\n",
       "               ...          \n",
       "57           沿763乡道向西步行66米左转\n",
       "58      沿763乡道向西南步行64米向右前方行走\n",
       "59      沿763乡道向西步行272米向左前方行走\n",
       "60          沿763乡道向南步行250米右转\n",
       "61      沿763乡道向西步行340米向右前方行走\n",
       "62          沿763乡道向西步行899米直行\n",
       "63         沿095县道向西步行1795米左转\n",
       "64         沿095县道向西南步行104米直行\n",
       "65               向西南步行358米直行\n",
       "66          沿095县道向西南步行90米左转\n",
       "67          沿095县道向东南步行50米右转\n",
       "68     沿095县道向西南步行115米向右前方行走\n",
       "69     沿关金路港底路段向西步行23米向右前方行走\n",
       "70              向西步行12333米右转\n",
       "71         沿234省道向北步行1662米左转\n",
       "72          沿932乡道向西步行394米左转\n",
       "73       沿932乡道向南步行52米向右前方行走\n",
       "74         沿932乡道向西步行1666米左转\n",
       "75       沿236省道向西南步行11294米右转\n",
       "76          沿399乡道向西北步行12米左转\n",
       "77          沿洪阳大道向西南步行909米直行\n",
       "78          沿新兴南路向西南步行198米直行\n",
       "79               向西南步行462米直行\n",
       "80               向西南步行136米直行\n",
       "81          沿洪阳大道向西南步行120米右转\n",
       "82      沿道江东路向西步行7489米向右前方行走\n",
       "83                   步行12米右转\n",
       "84           沿解放路向西北步行110米左转\n",
       "85               向西南步行252米右转\n",
       "86             向西北步行59米到达目的地\n",
       "Name: instruction, Length: 87, dtype: object"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "龙珠寺_湖滨居委会 = walking(南澳岛龙珠寺_location,湖滨居委会_location)\n",
    "df_步行路径规划2 = pd.io.json.json_normalize(龙珠寺_湖滨居委会[\"route\"][\"paths\"][0]['steps'])\n",
    "display(df_步行路径规划2)\n",
    "df_步行路径规划2[\"instruction\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 公交规划\n",
    "##### 城市内公交规划"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(起点)揭阳一中_location: 116.349701,23.543100 (终点)湖滨居委会_location: 116.141873,23.440937\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>info</th>\n",
       "      <th>infocode</th>\n",
       "      <th>route.destination</th>\n",
       "      <th>route.distance</th>\n",
       "      <th>route.origin</th>\n",
       "      <th>route.taxi_cost</th>\n",
       "      <th>route.transits</th>\n",
       "      <th>status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "      <td>OK</td>\n",
       "      <td>10000</td>\n",
       "      <td>116.141873,23.440937</td>\n",
       "      <td>29755</td>\n",
       "      <td>116.349701,23.543100</td>\n",
       "      <td>0.0</td>\n",
       "      <td>[{'cost': [], 'duration': '5657', 'nightflag':...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  count info infocode     route.destination route.distance  \\\n",
       "0     3   OK    10000  116.141873,23.440937          29755   \n",
       "\n",
       "           route.origin route.taxi_cost  \\\n",
       "0  116.349701,23.543100             0.0   \n",
       "\n",
       "                                      route.transits status  \n",
       "0  [{'cost': [], 'duration': '5657', 'nightflag':...      1  "
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def integrated(origin,destination,city,cityd=None,extensions='base',strategy=None,nightflag=0,date=None,time=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/transit/integrated?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'city':city,\n",
    "        'cityd':cityd,\n",
    "        'extensions':extensions,\n",
    "        'strategy':strategy,\n",
    "        'nightflag':nightflag,\n",
    "        'date':date,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "\n",
    "# 准备公交路径参数\n",
    "湖滨居委会 = geocode('广东省揭阳市揭西县棉湖镇湖滨居委会')\n",
    "湖滨居委会_location = 湖滨居委会['geocodes'][0]['location']\n",
    "揭阳一中 = geocode(address='广东省揭阳市榕城区揭阳第一中学')\n",
    "揭阳一中_location = 揭阳一中['geocodes'][0]['location']\n",
    "print(\"(起点)揭阳一中_location:\",揭阳一中_location,\"(终点)湖滨居委会_location:\",湖滨居委会_location)\n",
    "# 将新地址设置为起点和终点\n",
    "\n",
    "# 公交路径规划\n",
    "一中_湖滨 = integrated(揭阳一中_location,湖滨居委会_location,city='揭阳',extensions='all')\n",
    "df_bus = pd.io.json.json_normalize(一中_湖滨)\n",
    "df_bus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>cost</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>missed</th>\n",
       "      <th>nightflag</th>\n",
       "      <th>segments</th>\n",
       "      <th>walking_distance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[]</td>\n",
       "      <td>33295</td>\n",
       "      <td>5657</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '116.34991...</td>\n",
       "      <td>2277</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[]</td>\n",
       "      <td>33696</td>\n",
       "      <td>6257</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '116.34991...</td>\n",
       "      <td>1114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>[]</td>\n",
       "      <td>34088</td>\n",
       "      <td>5820</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '116.34991...</td>\n",
       "      <td>1256</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  cost distance duration missed nightflag  \\\n",
       "0   []    33295     5657      0         0   \n",
       "1   []    33696     6257      0         0   \n",
       "2   []    34088     5820      0         0   \n",
       "\n",
       "                                            segments walking_distance  \n",
       "0  [{'taxi': [], 'walking': {'origin': '116.34991...             2277  \n",
       "1  [{'taxi': [], 'walking': {'origin': '116.34991...             1114  \n",
       "2  [{'taxi': [], 'walking': {'origin': '116.34991...             1256  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.io.json.json_normalize(一中_湖滨[\"route\"]['transits'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bus.buslines</th>\n",
       "      <th>entrance</th>\n",
       "      <th>exit</th>\n",
       "      <th>railway.alters</th>\n",
       "      <th>railway.spaces</th>\n",
       "      <th>railway.via_stops</th>\n",
       "      <th>taxi</th>\n",
       "      <th>walking.destination</th>\n",
       "      <th>walking.distance</th>\n",
       "      <th>walking.duration</th>\n",
       "      <th>walking.origin</th>\n",
       "      <th>walking.steps</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[{'departure_stop': {'name': '凤潮村', 'id': '900...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.347725,23.553421</td>\n",
       "      <td>1489</td>\n",
       "      <td>1276</td>\n",
       "      <td>116.349915,23.543537</td>\n",
       "      <td>[{'instruction': '步行67米右转', 'road': [], 'dista...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.142029,23.441002</td>\n",
       "      <td>788</td>\n",
       "      <td>675</td>\n",
       "      <td>116.148224,23.440916</td>\n",
       "      <td>[{'instruction': '沿道江东路步行355米向右前方行走', 'road': ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        bus.buslines entrance exit  \\\n",
       "0  [{'departure_stop': {'name': '凤潮村', 'id': '900...       []   []   \n",
       "1                                                 []       []   []   \n",
       "\n",
       "  railway.alters railway.spaces railway.via_stops taxi   walking.destination  \\\n",
       "0             []             []                []   []  116.347725,23.553421   \n",
       "1             []             []                []   []  116.142029,23.441002   \n",
       "\n",
       "  walking.distance walking.duration        walking.origin  \\\n",
       "0             1489             1276  116.349915,23.543537   \n",
       "1              788              675  116.148224,23.440916   \n",
       "\n",
       "                                       walking.steps  \n",
       "0  [{'instruction': '步行67米右转', 'road': [], 'dista...  \n",
       "1  [{'instruction': '沿道江东路步行355米向右前方行走', 'road': ...  "
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.io.json.json_normalize(一中_湖滨[\"route\"]['transits'][0]['segments'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>arrival_stop.id</th>\n",
       "      <th>arrival_stop.location</th>\n",
       "      <th>arrival_stop.name</th>\n",
       "      <th>bustimetag</th>\n",
       "      <th>departure_stop.id</th>\n",
       "      <th>departure_stop.location</th>\n",
       "      <th>departure_stop.name</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>end_time</th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>polyline</th>\n",
       "      <th>start_time</th>\n",
       "      <th>type</th>\n",
       "      <th>via_num</th>\n",
       "      <th>via_stops</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>900000041720034</td>\n",
       "      <td>116.148224,23.440907</td>\n",
       "      <td>棉湖华侨医院</td>\n",
       "      <td>0</td>\n",
       "      <td>900000041720014</td>\n",
       "      <td>116.347557,23.553387</td>\n",
       "      <td>凤潮村</td>\n",
       "      <td>31018</td>\n",
       "      <td>3706</td>\n",
       "      <td>1700</td>\n",
       "      <td>900000041720</td>\n",
       "      <td>揭西-揭阳(揭阳汽车客运站--揭西金和)</td>\n",
       "      <td>116.347557,23.553387;116.345772,23.553102;116....</td>\n",
       "      <td>0630</td>\n",
       "      <td>普通公交线路</td>\n",
       "      <td>19</td>\n",
       "      <td>[{'name': '乔南路口', 'id': '900000041720015', 'lo...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   arrival_stop.id arrival_stop.location arrival_stop.name bustimetag  \\\n",
       "0  900000041720034  116.148224,23.440907            棉湖华侨医院          0   \n",
       "\n",
       "  departure_stop.id departure_stop.location departure_stop.name distance  \\\n",
       "0   900000041720014    116.347557,23.553387                 凤潮村    31018   \n",
       "\n",
       "  duration end_time            id                  name  \\\n",
       "0     3706     1700  900000041720  揭西-揭阳(揭阳汽车客运站--揭西金和)   \n",
       "\n",
       "                                            polyline start_time    type  \\\n",
       "0  116.347557,23.553387;116.345772,23.553102;116....       0630  普通公交线路   \n",
       "\n",
       "  via_num                                          via_stops  \n",
       "0      19  [{'name': '乔南路口', 'id': '900000041720015', 'lo...  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bus_基本信息 = pd.io.json.json_normalize(一中_湖滨[\"route\"]['transits'][0]['segments'][0]['bus'][\"buslines\"])\n",
    "df_bus_基本信息"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 尝试跨城市公交，必填cityd（目的地城市）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(起点)南澳岛龙珠寺_location: 117.062832,23.434297 (终点)湖滨居委会_location: 116.141873,23.440937\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>info</th>\n",
       "      <th>infocode</th>\n",
       "      <th>route.destination</th>\n",
       "      <th>route.distance</th>\n",
       "      <th>route.origin</th>\n",
       "      <th>route.taxi_cost</th>\n",
       "      <th>route.transits</th>\n",
       "      <th>status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "      <td>OK</td>\n",
       "      <td>10000</td>\n",
       "      <td>116.141873,23.440937</td>\n",
       "      <td>86514</td>\n",
       "      <td>117.062832,23.434297</td>\n",
       "      <td>255.68367999999998</td>\n",
       "      <td>[{'cost': [], 'duration': '20368', 'nightflag'...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  count info infocode     route.destination route.distance  \\\n",
       "0     3   OK    10000  116.141873,23.440937          86514   \n",
       "\n",
       "           route.origin     route.taxi_cost  \\\n",
       "0  117.062832,23.434297  255.68367999999998   \n",
       "\n",
       "                                      route.transits status  \n",
       "0  [{'cost': [], 'duration': '20368', 'nightflag'...      1  "
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "南澳岛龙珠寺 = geocode('广东省汕头市南澳岛生态旅游区龙珠寺')\n",
    "南澳岛龙珠寺\n",
    "# 输入新地址，新建地理编码\n",
    "南澳岛龙珠寺_location = 南澳岛龙珠寺['geocodes'][0]['location']\n",
    "湖滨居委会 = geocode('广东省揭阳市揭西县棉湖镇湖滨居委会')\n",
    "湖滨居委会\n",
    "# 输入新地址，新建地理编码\n",
    "湖滨居委会_location = 湖滨居委会['geocodes'][0]['location']\n",
    "print(\"(起点)南澳岛龙珠寺_location:\",南澳岛龙珠寺_location,\"(终点)湖滨居委会_location:\",湖滨居委会_location)\n",
    "# 将新地址设置为起点和终点\n",
    "\n",
    "# 公交路径规划\n",
    "龙珠寺_湖滨 = integrated(南澳岛龙珠寺_location,湖滨居委会_location,city='汕头',cityd='揭阳', extensions='all')\n",
    "df_bus = pd.io.json.json_normalize(龙珠寺_湖滨)\n",
    "df_bus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>cost</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>missed</th>\n",
       "      <th>nightflag</th>\n",
       "      <th>segments</th>\n",
       "      <th>walking_distance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[]</td>\n",
       "      <td>132498</td>\n",
       "      <td>20368</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '117.06283...</td>\n",
       "      <td>5184</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[]</td>\n",
       "      <td>132575</td>\n",
       "      <td>20497</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '117.06283...</td>\n",
       "      <td>6220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>[]</td>\n",
       "      <td>135888</td>\n",
       "      <td>20798</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>[{'taxi': [], 'walking': {'origin': '117.06283...</td>\n",
       "      <td>5184</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  cost distance duration missed nightflag  \\\n",
       "0   []   132498    20368      0         0   \n",
       "1   []   132575    20497      0         0   \n",
       "2   []   135888    20798      0         0   \n",
       "\n",
       "                                            segments walking_distance  \n",
       "0  [{'taxi': [], 'walking': {'origin': '117.06283...             5184  \n",
       "1  [{'taxi': [], 'walking': {'origin': '117.06283...             6220  \n",
       "2  [{'taxi': [], 'walking': {'origin': '117.06283...             5184  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.io.json.json_normalize(龙珠寺_湖滨[\"route\"]['transits'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bus.buslines</th>\n",
       "      <th>entrance</th>\n",
       "      <th>exit</th>\n",
       "      <th>railway.alters</th>\n",
       "      <th>railway.spaces</th>\n",
       "      <th>railway.via_stops</th>\n",
       "      <th>taxi</th>\n",
       "      <th>walking.destination</th>\n",
       "      <th>walking.distance</th>\n",
       "      <th>walking.duration</th>\n",
       "      <th>walking.origin</th>\n",
       "      <th>walking.steps</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[{'departure_stop': {'name': '南澳海关', 'id': '90...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.035721,23.421671</td>\n",
       "      <td>4071</td>\n",
       "      <td>3489</td>\n",
       "      <td>117.062836,23.434332</td>\n",
       "      <td>[{'instruction': '沿057县道步行2375米向左后方行走', 'road'...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[{'departure_stop': {'name': '游客中心', 'id': '90...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>117.025787,23.415911</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>117.025803,23.415911</td>\n",
       "      <td>[{'instruction': '沿海滨路步行1米到达游客中心', 'road': '海滨...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>[{'departure_stop': {'name': '东厦中学北校区', 'id': ...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.703476,23.374731</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>116.703484,23.374731</td>\n",
       "      <td>[{'instruction': '沿金湖路步行1米到达东厦中学北校区', 'road': ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>[{'departure_stop': {'name': '马牙车站', 'id': '90...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.358734,23.553602</td>\n",
       "      <td>323</td>\n",
       "      <td>276</td>\n",
       "      <td>116.361656,23.553425</td>\n",
       "      <td>[{'instruction': '沿新阳路步行243米向右前方行走', 'road': '...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.142029,23.441002</td>\n",
       "      <td>788</td>\n",
       "      <td>675</td>\n",
       "      <td>116.148224,23.440916</td>\n",
       "      <td>[{'instruction': '沿道江东路步行355米向右前方行走', 'road': ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        bus.buslines entrance exit  \\\n",
       "0  [{'departure_stop': {'name': '南澳海关', 'id': '90...       []   []   \n",
       "1  [{'departure_stop': {'name': '游客中心', 'id': '90...       []   []   \n",
       "2  [{'departure_stop': {'name': '东厦中学北校区', 'id': ...       []   []   \n",
       "3  [{'departure_stop': {'name': '马牙车站', 'id': '90...       []   []   \n",
       "4                                                 []       []   []   \n",
       "\n",
       "  railway.alters railway.spaces railway.via_stops taxi   walking.destination  \\\n",
       "0             []             []                []   []  117.035721,23.421671   \n",
       "1             []             []                []   []  117.025787,23.415911   \n",
       "2             []             []                []   []  116.703476,23.374731   \n",
       "3             []             []                []   []  116.358734,23.553602   \n",
       "4             []             []                []   []  116.142029,23.441002   \n",
       "\n",
       "  walking.distance walking.duration        walking.origin  \\\n",
       "0             4071             3489  117.062836,23.434332   \n",
       "1                1                0  117.025803,23.415911   \n",
       "2                1                0  116.703484,23.374731   \n",
       "3              323              276  116.361656,23.553425   \n",
       "4              788              675  116.148224,23.440916   \n",
       "\n",
       "                                       walking.steps  \n",
       "0  [{'instruction': '沿057县道步行2375米向左后方行走', 'road'...  \n",
       "1  [{'instruction': '沿海滨路步行1米到达游客中心', 'road': '海滨...  \n",
       "2  [{'instruction': '沿金湖路步行1米到达东厦中学北校区', 'road': ...  \n",
       "3  [{'instruction': '沿新阳路步行243米向右前方行走', 'road': '...  \n",
       "4  [{'instruction': '沿道江东路步行355米向右前方行走', 'road': ...  "
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.io.json.json_normalize(龙珠寺_湖滨[\"route\"]['transits'][0]['segments'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>arrival_stop.id</th>\n",
       "      <th>arrival_stop.location</th>\n",
       "      <th>arrival_stop.name</th>\n",
       "      <th>bustimetag</th>\n",
       "      <th>departure_stop.id</th>\n",
       "      <th>departure_stop.location</th>\n",
       "      <th>departure_stop.name</th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>end_time</th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>polyline</th>\n",
       "      <th>start_time</th>\n",
       "      <th>type</th>\n",
       "      <th>via_num</th>\n",
       "      <th>via_stops</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>900000096183002</td>\n",
       "      <td>117.025803,23.415911</td>\n",
       "      <td>游客中心</td>\n",
       "      <td>0</td>\n",
       "      <td>900000096183001</td>\n",
       "      <td>117.035713,23.421667</td>\n",
       "      <td>南澳海关</td>\n",
       "      <td>1689</td>\n",
       "      <td>841</td>\n",
       "      <td>1900</td>\n",
       "      <td>900000096183</td>\n",
       "      <td>203K路(南澳海关--澄海汽车总站)</td>\n",
       "      <td>117.035713,23.421667;117.035637,23.420147;117....</td>\n",
       "      <td>0630</td>\n",
       "      <td>普通公交线路</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   arrival_stop.id arrival_stop.location arrival_stop.name bustimetag  \\\n",
       "0  900000096183002  117.025803,23.415911              游客中心          0   \n",
       "\n",
       "  departure_stop.id departure_stop.location departure_stop.name distance  \\\n",
       "0   900000096183001    117.035713,23.421667                南澳海关     1689   \n",
       "\n",
       "  duration end_time            id                 name  \\\n",
       "0      841     1900  900000096183  203K路(南澳海关--澄海汽车总站)   \n",
       "\n",
       "                                            polyline start_time    type  \\\n",
       "0  117.035713,23.421667;117.035637,23.420147;117....       0630  普通公交线路   \n",
       "\n",
       "  via_num via_stops  \n",
       "0       0        []  "
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bus_基本信息 = pd.io.json.json_normalize(龙珠寺_湖滨[\"route\"]['transits'][0]['segments'][0]['bus'][\"buslines\"])\n",
    "df_bus_基本信息"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 行政区查询\n",
    "1. 目前部分城市和省直辖县因为没有区县的概念，故在市级下方直接显示街道。例如：广东-东莞、海南-文昌市。\n",
    "2. 街道级别是不能返回边界数据polyline的，乡镇街道级别返回的adcode是所属区县的adcode。\n",
    "3. 行政区查询应该与机器学习相关，通过数据搜索比对，返回结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>center</th>\n",
       "      <th>citycode</th>\n",
       "      <th>districts</th>\n",
       "      <th>level</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>420100</td>\n",
       "      <td>114.298572,30.584355</td>\n",
       "      <td>027</td>\n",
       "      <td>[{'citycode': '027', 'adcode': '420117', 'name...</td>\n",
       "      <td>city</td>\n",
       "      <td>武汉市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>420900</td>\n",
       "      <td>113.926655,30.926423</td>\n",
       "      <td>0712</td>\n",
       "      <td>[{'citycode': '0712', 'adcode': '420982', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>孝感市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>421100</td>\n",
       "      <td>114.879365,30.447711</td>\n",
       "      <td>0713</td>\n",
       "      <td>[{'citycode': '0713', 'adcode': '421181', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>黄冈市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>420800</td>\n",
       "      <td>112.204251,31.03542</td>\n",
       "      <td>0724</td>\n",
       "      <td>[{'citycode': '0724', 'adcode': '420882', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>荆门市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>420300</td>\n",
       "      <td>110.787916,32.646907</td>\n",
       "      <td>0719</td>\n",
       "      <td>[{'citycode': '0719', 'adcode': '420304', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>十堰市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>420500</td>\n",
       "      <td>111.290843,30.702636</td>\n",
       "      <td>0717</td>\n",
       "      <td>[{'citycode': '0717', 'adcode': '420525', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>宜昌市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>429006</td>\n",
       "      <td>113.165862,30.653061</td>\n",
       "      <td>1728</td>\n",
       "      <td>[{'citycode': '1728', 'adcode': '429006', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>天门市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>420600</td>\n",
       "      <td>112.144146,32.042426</td>\n",
       "      <td>0710</td>\n",
       "      <td>[{'citycode': '0710', 'adcode': '420682', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>襄阳市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>429004</td>\n",
       "      <td>113.453974,30.364953</td>\n",
       "      <td>0728</td>\n",
       "      <td>[{'citycode': '0728', 'adcode': '429004', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>仙桃市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>429005</td>\n",
       "      <td>112.896866,30.421215</td>\n",
       "      <td>2728</td>\n",
       "      <td>[{'citycode': '2728', 'adcode': '429005', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>潜江市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>421000</td>\n",
       "      <td>112.23813,30.326857</td>\n",
       "      <td>0716</td>\n",
       "      <td>[{'citycode': '0716', 'adcode': '421003', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>荆州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>421300</td>\n",
       "      <td>113.37377,31.717497</td>\n",
       "      <td>0722</td>\n",
       "      <td>[{'citycode': '0722', 'adcode': '421303', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>随州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>422800</td>\n",
       "      <td>109.48699,30.283114</td>\n",
       "      <td>0718</td>\n",
       "      <td>[{'citycode': '0718', 'adcode': '422822', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>恩施土家族苗族自治州</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>421200</td>\n",
       "      <td>114.328963,29.832798</td>\n",
       "      <td>0715</td>\n",
       "      <td>[{'citycode': '0715', 'adcode': '421221', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>咸宁市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>429021</td>\n",
       "      <td>110.671525,31.744449</td>\n",
       "      <td>1719</td>\n",
       "      <td>[{'citycode': '1719', 'adcode': '429021', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>神农架林区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>420700</td>\n",
       "      <td>114.890593,30.396536</td>\n",
       "      <td>0711</td>\n",
       "      <td>[{'citycode': '0711', 'adcode': '420702', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>鄂州市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>420200</td>\n",
       "      <td>115.077048,30.220074</td>\n",
       "      <td>0714</td>\n",
       "      <td>[{'citycode': '0714', 'adcode': '420205', 'nam...</td>\n",
       "      <td>city</td>\n",
       "      <td>黄石市</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    adcode                center citycode  \\\n",
       "0   420100  114.298572,30.584355      027   \n",
       "1   420900  113.926655,30.926423     0712   \n",
       "2   421100  114.879365,30.447711     0713   \n",
       "3   420800   112.204251,31.03542     0724   \n",
       "4   420300  110.787916,32.646907     0719   \n",
       "5   420500  111.290843,30.702636     0717   \n",
       "6   429006  113.165862,30.653061     1728   \n",
       "7   420600  112.144146,32.042426     0710   \n",
       "8   429004  113.453974,30.364953     0728   \n",
       "9   429005  112.896866,30.421215     2728   \n",
       "10  421000   112.23813,30.326857     0716   \n",
       "11  421300   113.37377,31.717497     0722   \n",
       "12  422800   109.48699,30.283114     0718   \n",
       "13  421200  114.328963,29.832798     0715   \n",
       "14  429021  110.671525,31.744449     1719   \n",
       "15  420700  114.890593,30.396536     0711   \n",
       "16  420200  115.077048,30.220074     0714   \n",
       "\n",
       "                                            districts level        name  \n",
       "0   [{'citycode': '027', 'adcode': '420117', 'name...  city         武汉市  \n",
       "1   [{'citycode': '0712', 'adcode': '420982', 'nam...  city         孝感市  \n",
       "2   [{'citycode': '0713', 'adcode': '421181', 'nam...  city         黄冈市  \n",
       "3   [{'citycode': '0724', 'adcode': '420882', 'nam...  city         荆门市  \n",
       "4   [{'citycode': '0719', 'adcode': '420304', 'nam...  city         十堰市  \n",
       "5   [{'citycode': '0717', 'adcode': '420525', 'nam...  city         宜昌市  \n",
       "6   [{'citycode': '1728', 'adcode': '429006', 'nam...  city         天门市  \n",
       "7   [{'citycode': '0710', 'adcode': '420682', 'nam...  city         襄阳市  \n",
       "8   [{'citycode': '0728', 'adcode': '429004', 'nam...  city         仙桃市  \n",
       "9   [{'citycode': '2728', 'adcode': '429005', 'nam...  city         潜江市  \n",
       "10  [{'citycode': '0716', 'adcode': '421003', 'nam...  city         荆州市  \n",
       "11  [{'citycode': '0722', 'adcode': '421303', 'nam...  city         随州市  \n",
       "12  [{'citycode': '0718', 'adcode': '422822', 'nam...  city  恩施土家族苗族自治州  \n",
       "13  [{'citycode': '0715', 'adcode': '421221', 'nam...  city         咸宁市  \n",
       "14  [{'citycode': '1719', 'adcode': '429021', 'nam...  city       神农架林区  \n",
       "15  [{'citycode': '0711', 'adcode': '420702', 'nam...  city         鄂州市  \n",
       "16  [{'citycode': '0714', 'adcode': '420205', 'nam...  city         黄石市  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>center</th>\n",
       "      <th>citycode</th>\n",
       "      <th>districts</th>\n",
       "      <th>level</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>420117</td>\n",
       "      <td>114.802108,30.842149</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>新洲区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>420116</td>\n",
       "      <td>114.374025,30.874155</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>黄陂区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>420114</td>\n",
       "      <td>114.029341,30.582186</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>蔡甸区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>420113</td>\n",
       "      <td>114.08124,30.309637</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>汉南区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>420115</td>\n",
       "      <td>114.313961,30.349045</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>江夏区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>420106</td>\n",
       "      <td>114.307344,30.546536</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>武昌区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>420112</td>\n",
       "      <td>114.142483,30.622467</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>东西湖区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>420104</td>\n",
       "      <td>114.264568,30.57061</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>硚口区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>420105</td>\n",
       "      <td>114.265807,30.549326</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>汉阳区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>420111</td>\n",
       "      <td>114.400718,30.504259</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>洪山区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>420107</td>\n",
       "      <td>114.39707,30.634215</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>青山区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>420102</td>\n",
       "      <td>114.30304,30.594911</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>江岸区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>420103</td>\n",
       "      <td>114.283109,30.578771</td>\n",
       "      <td>027</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>江汉区</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    adcode                center citycode districts     level  name\n",
       "0   420117  114.802108,30.842149      027        []  district   新洲区\n",
       "1   420116  114.374025,30.874155      027        []  district   黄陂区\n",
       "2   420114  114.029341,30.582186      027        []  district   蔡甸区\n",
       "3   420113   114.08124,30.309637      027        []  district   汉南区\n",
       "4   420115  114.313961,30.349045      027        []  district   江夏区\n",
       "5   420106  114.307344,30.546536      027        []  district   武昌区\n",
       "6   420112  114.142483,30.622467      027        []  district  东西湖区\n",
       "7   420104   114.264568,30.57061      027        []  district   硚口区\n",
       "8   420105  114.265807,30.549326      027        []  district   汉阳区\n",
       "9   420111  114.400718,30.504259      027        []  district   洪山区\n",
       "10  420107   114.39707,30.634215      027        []  district   青山区\n",
       "11  420102   114.30304,30.594911      027        []  district   江岸区\n",
       "12  420103  114.283109,30.578771      027        []  district   江汉区"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>adcode</th>\n",
       "      <th>center</th>\n",
       "      <th>citycode</th>\n",
       "      <th>districts</th>\n",
       "      <th>level</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>420205</td>\n",
       "      <td>114.901366,30.20601</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>铁山区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>420204</td>\n",
       "      <td>114.975755,30.177845</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>下陆区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>420203</td>\n",
       "      <td>115.093354,30.205365</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>西塞山区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>420222</td>\n",
       "      <td>115.212883,29.841572</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>阳新县</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>420281</td>\n",
       "      <td>114.974842,30.098804</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>大冶市</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>420202</td>\n",
       "      <td>115.090164,30.212086</td>\n",
       "      <td>0714</td>\n",
       "      <td>[]</td>\n",
       "      <td>district</td>\n",
       "      <td>黄石港区</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   adcode                center citycode districts     level  name\n",
       "0  420205   114.901366,30.20601     0714        []  district   铁山区\n",
       "1  420204  114.975755,30.177845     0714        []  district   下陆区\n",
       "2  420203  115.093354,30.205365     0714        []  district  西塞山区\n",
       "3  420222  115.212883,29.841572     0714        []  district   阳新县\n",
       "4  420281  114.974842,30.098804     0714        []  district   大冶市\n",
       "5  420202  115.090164,30.212086     0714        []  district  黄石港区"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def district(keywords,subdistrict=None,page=None,offset=None,extensions='base',filter=None,)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/config/district?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'keywords':keywords,\n",
    "        'subdistrict':subdistrict,\n",
    "        'page':page,\n",
    "        'offset':offset,\n",
    "        'extensions':extensions,\n",
    "        'filter':filter,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "行政区域 = district(keywords='湖北',extensions='all',subdistrict=2)\n",
    "\n",
    "df_行政区域_1级 = pd.io.json.json_normalize(行政区域[\"districts\"][0]['districts'])\n",
    "df_行政区域_2级_武汉市 = pd.io.json.json_normalize(行政区域[\"districts\"][0]['districts'][0]['districts'])\n",
    "df_行政区域_2级_黄石市 = pd.io.json.json_normalize(行政区域[\"districts\"][0]['districts'][16]['districts'])\n",
    "display(df_行政区域_1级,df_行政区域_2级_武汉市,df_行政区域_2级_黄石市)\n",
    "# 行政区域[\"districts\"][0]['districts'][16]['districts'] 第一个中括号固定选[0]表示我们选定的省份，第二个中括号任选，根据以及行政区呈现的‘adcode’前的序号决定"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 搜索POI\n",
    "1. 关键字搜索：通过用POI的关键字进行条件搜索，例如：肯德基、朝阳公园等；同时支持设置POI类型搜索，例如：银行\n",
    "2. ：在用户传入经纬度坐标点附近，在设定的范围内，按照关键字或POI类型搜索；\n",
    "3. 多边形搜索：在多边形区域内进行搜索\n",
    "4. 结合人工智能与机器学习，为人们的出行提供更加优质的方案，让人们可以提前规划更详细的行程，让旅途安心"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 关键字搜索（代码E）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '899',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'pois': [{'id': 'B000A7I1TH',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '静园川菜(东交民巷店)',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'typecode': '050102',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '正义路东交民巷28号楼A座(首都宾馆北门)',\n",
       "   'location': '116.408019,39.902449',\n",
       "   'tel': '010-65244156',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '62.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/426afa8bd5ab42a085dad1a136dd61a7',\n",
       "     'provider': [],\n",
       "     'title': '菜品'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/bcde13c3a954caf915032c8dee07a7b6',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/3e264016a133d302c48c4dbd4f416921',\n",
       "     'provider': [],\n",
       "     'title': '肥肠面'}]},\n",
       "  {'id': 'B000A7ZDMP',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '北京隆和居美食城(正义路店)',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '正义路8号(市政府斜对面)',\n",
       "   'location': '116.406575,39.903422',\n",
       "   'tel': '010-65263265',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '69.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/5f7f2f0c40318a3dbf9b99ca49009610',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/04701cbcaeb3e193675700eda2ad0e01',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/1f941c37101dc0eba90c9e0244d9d145',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A83BNF',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '全聚德烤鸭店(天安门店)',\n",
       "   'type': '餐饮服务;中餐厅;北京菜',\n",
       "   'typecode': '050111',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '东交民巷44号',\n",
       "   'location': '116.400068,39.901436',\n",
       "   'tel': '010-65132855;010-65122265',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '161.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/17a27caf86718b37aec0150021863edd',\n",
       "     'provider': [],\n",
       "     'title': '产品图'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/679d6d02746e1016f54f1e0ea6f1722c',\n",
       "     'provider': [],\n",
       "     'title': '外景图'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/57609f77010b518d3dca25b033f249d1',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B0FFG9V1R9',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '四季民福烤鸭店(故宫店)',\n",
       "   'type': '餐饮服务;中餐厅;北京菜',\n",
       "   'typecode': '050111',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '南池子大街11号',\n",
       "   'location': '116.402891,39.914590',\n",
       "   'tel': '010-65267369;17570883520',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '5.0', 'cost': '152.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/21f041ead21a5a28765078d95f041056',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/16226067ca381cbf00ac6752a8615fd8',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/9cd620b2044b04b80320494d9b2da101',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8WCAL',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '肯德基(前门东大街店)',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'typecode': '050301',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '前门东大街甲2号1-B1层',\n",
       "   'location': '116.400046,39.899696',\n",
       "   'tel': '010-67011950;010-67010282',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '44.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/cf64ea8e22533b4bba864a3b10c322fb',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/562babf0bed84d8fa9901b563a16cc86',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/881c3e1adadd0de058799f5cc47fe819',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A804YB',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '东来顺(天安门店)',\n",
       "   'type': '餐饮服务;中餐厅;老字号',\n",
       "   'typecode': '050116',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '东交民巷44号院',\n",
       "   'location': '116.400135,39.900944',\n",
       "   'tel': '010-65241042',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.0', 'cost': '138.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/e3a6c1dba7682a91940cb34623afc2ed',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/b8076322e0f485a6532057cfd5b97ea4',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/0448697facde3a08ef22d224fc257e3a',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8758C',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '人民大会堂宴会厅',\n",
       "   'type': '餐饮服务;中餐厅;综合酒楼',\n",
       "   'typecode': '050101',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '西长安街天安门广场西侧(天安门广场西)',\n",
       "   'location': '116.393711,39.904989',\n",
       "   'tel': [],\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '5.0', 'cost': '650.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/aa719eeb1d510e32993afdfb2521228a',\n",
       "     'provider': [],\n",
       "     'title': '产品图'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/fbc59e184ad34f7ab2ee20b151697617',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/3be3dde35397be04a61da2b6f9605f8d',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8UI43',\n",
       "   'parent': 'B0FFH14X68',\n",
       "   'childtype': '201',\n",
       "   'name': '麦当劳(祈年大街得来速店)',\n",
       "   'type': '餐饮服务;快餐厅;麦当劳',\n",
       "   'typecode': '050302',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '东打磨厂街7号新活馆1层',\n",
       "   'location': '116.412544,39.899665',\n",
       "   'tel': '010-67082846;010-67082346',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '30.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/d4b12f8b3917891847ee618bb2398ec1',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/cb29aa4d530f6650dd9f4857ed98c39d',\n",
       "     'provider': [],\n",
       "     'title': '麦辣鸡腿汉堡经典中薯条套餐'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/1f0387c6a381af3bd154e1d309ca7854',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A83BU7',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '全聚德烤鸭店(王府井店)',\n",
       "   'type': '餐饮服务;中餐厅;老字号|餐饮服务;中餐厅;北京菜',\n",
       "   'typecode': '050116|050111',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '王府井大街帅府园胡同9号',\n",
       "   'location': '116.412032,39.912163',\n",
       "   'tel': '010-65228384;010-65253310',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '191.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/e4071a413a2fcff9fce190b4d984d832',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/7256566675836853a782fca742a0ff30',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/e383bd1245d9b6e7bc39de84d59364d3',\n",
       "     'provider': [],\n",
       "     'title': '菜品'}]},\n",
       "  {'id': 'B000AA3YM8',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '花马天堂云南餐厅(前门东大街)',\n",
       "   'type': '餐饮服务;中餐厅;云贵菜',\n",
       "   'typecode': '050114',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '前门东大街23号G单元美国使馆旧址东北角',\n",
       "   'location': '116.402060,39.901861',\n",
       "   'tel': '010-85162698',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '5.0', 'cost': '209.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/ac3f02db95d386f1752bf3a416aabaf3',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/eec1cd52985eedb7a6ac046c12c6d7f8',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/23dbe52e8d76efe9ed7a33c4df4885b6',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A9JLJ3',\n",
       "   'parent': 'B000A852XN',\n",
       "   'childtype': '201',\n",
       "   'name': '神洲四海海鲜大酒楼(澳门中心商场店)',\n",
       "   'type': '餐饮服务;中餐厅;海鲜酒楼',\n",
       "   'typecode': '050119',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '王府井东街8号澳门中心F4层',\n",
       "   'location': '116.413390,39.914808',\n",
       "   'tel': '010-58138238;15210553549;15801202304',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '915.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/a1b5c54d7554f2337a555fa3672a08ff',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/e0f4c58f85608b5afc9a55d310bd2021',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/dd38187a5ac4c0204fac7285868f6ff4',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8ULHM',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '便宜坊(鲜鱼口店)',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '鲜鱼口街65-77号',\n",
       "   'location': '116.400385,39.896294',\n",
       "   'tel': '010-67132535;010-67132536',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '120.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/1dd6aae6725da8fa0b261bfaacb5963a',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/ca54cc0ee9d72c503b32401662332716',\n",
       "     'provider': [],\n",
       "     'title': '菜品'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/e4f1d7a28d45a71261c299f25d870e41',\n",
       "     'provider': [],\n",
       "     'title': '菜品'}]},\n",
       "  {'id': 'B000A84FX4',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '都一处烧麦馆(前门店)',\n",
       "   'type': '餐饮服务;中餐厅;老字号',\n",
       "   'typecode': '050116',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '前门大街38号(大栅栏东口)',\n",
       "   'location': '116.398298,39.896198',\n",
       "   'tel': '010-67024578;010-67021555',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '79.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/5b052fe12a5ae8dd33be76e28978dd21',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/d79cb31eee2fdbed5fc0975d538a9a14',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/5efe647f006211881da16f7d977743a9',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B0FFFG09QK',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '局气(西单店)',\n",
       "   'type': '餐饮服务;中餐厅;北京菜',\n",
       "   'typecode': '050111',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '太仆寺街21号',\n",
       "   'location': '116.380193,39.912429',\n",
       "   'tel': '010-68085088;18600006811',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.5', 'cost': '111.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/e4679d25ffccad8769914d1bbb853eea',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/7db8053c4823486433258a2a7ff411ea',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/ee67f1f5322906cb2f08af7b28d153af',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8WXY0',\n",
       "   'parent': 'B000A842O2',\n",
       "   'childtype': '201',\n",
       "   'name': '外婆家(北京apm)',\n",
       "   'type': '餐饮服务;中餐厅;浙江菜',\n",
       "   'typecode': '050106',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '王府井大街138号新东安广场6层601',\n",
       "   'location': '116.411612,39.914964',\n",
       "   'tel': [],\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '64.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/b962ef2b736f4c81e1e2a2a7e0c733c3',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/0ed5a3c89e5238710da54562f8b76bb6',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/3f798dfce9dc1b11d630b9936a638905',\n",
       "     'provider': [],\n",
       "     'title': '菜品'}]},\n",
       "  {'id': 'B000A84AQB',\n",
       "   'parent': 'B000A82ZZS',\n",
       "   'childtype': '202',\n",
       "   'name': '麦当劳(新王府井店)',\n",
       "   'type': '餐饮服务;快餐厅;麦当劳',\n",
       "   'typecode': '050302',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '王府井大街200号工美大厦1层',\n",
       "   'location': '116.411675,39.910742',\n",
       "   'tel': '010-65120499',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.0', 'cost': '28.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/d4b12f8b3917891847ee618bb2398ec1',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/5db6453510400f92d980507bab63f0b7',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/9bd31f792f5d5efd0a5ac993d8625aac',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A7CC6R',\n",
       "   'parent': 'B0FFH12U1X',\n",
       "   'childtype': '202',\n",
       "   'name': '丰泽园(总店)',\n",
       "   'type': '餐饮服务;中餐厅;山东菜(鲁菜)',\n",
       "   'typecode': '050104',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '珠市口西大街83号',\n",
       "   'location': '116.394670,39.890824',\n",
       "   'tel': '010-63032828;010-63186688',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '4.5', 'cost': '179.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/7643a5c8c73aab594fd00b8d78bc4090',\n",
       "     'provider': [],\n",
       "     'title': '内景图'},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/d73dd99f2c389cd16913cfbdc496c3b2',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/c6e70ec110b9c651fc266a3d1cceaa27',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A8VWES',\n",
       "   'parent': 'B000A80P20',\n",
       "   'childtype': '201',\n",
       "   'name': '海底捞火锅(王府井店)',\n",
       "   'type': '餐饮服务;中餐厅;火锅店',\n",
       "   'typecode': '050117',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '王府井大街88号银泰in88百货3层',\n",
       "   'location': '116.411835,39.916047',\n",
       "   'tel': '010-59785688;010-59785689',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '5.0', 'cost': '130.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/e016826133059e3d2bda52fe1cd8394d',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/c0f999ee9fe7278a7ec2628a463b0423',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/eda07f95d6b5cb941c41e105b0349783',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A53D9E',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '爆肚冯(前门店)',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '廊房二条56号',\n",
       "   'location': '116.396016,39.897013',\n",
       "   'tel': '010-63083296',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': '3.5', 'cost': '77.00', 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/c540c0943217522dec6fba40d49bc284',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/5078c456778ebc9e2b89e69c87bbd27a',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/537ec3aaa310b9502c0cac60',\n",
       "     'provider': [],\n",
       "     'title': []}]},\n",
       "  {'id': 'B000A81JDJ',\n",
       "   'parent': 'B000A10FBB',\n",
       "   'childtype': '312',\n",
       "   'name': '北京饭店谭家菜',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '东长安街33号北京饭店C座7层',\n",
       "   'location': '116.408321,39.908792',\n",
       "   'tel': '010-85009688;010-65137766',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'rating': [], 'cost': [], 'meal_ordering': '0'},\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': [{'url': 'http://store.is.autonavi.com/showpic/b60a7512ed005bd44329be40809c43b1',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/1a7de00e79e988768b9a799755e9292e',\n",
       "     'provider': [],\n",
       "     'title': []},\n",
       "    {'url': 'http://store.is.autonavi.com/showpic/d3acc0e502901b9b36ae0d46c9b925e5',\n",
       "     'provider': [],\n",
       "     'title': []}]}]}"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def place_text(keywords,types,city=None,citylimit=None,children=None,page=None,extensions='base',sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/place/text?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'keywords':keywords,\n",
    "        'types':types,\n",
    "        'city':city,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n",
    "\n",
    "北京_美食 = place_text('美食','学校',city=\"北京市\")\n",
    "北京_美食\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>address</th>\n",
       "      <th>adname</th>\n",
       "      <th>biz_ext.cost</th>\n",
       "      <th>biz_ext.meal_ordering</th>\n",
       "      <th>biz_ext.rating</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>childtype</th>\n",
       "      <th>cityname</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>...</th>\n",
       "      <th>name</th>\n",
       "      <th>parent</th>\n",
       "      <th>photos</th>\n",
       "      <th>pname</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>shopid</th>\n",
       "      <th>shopinfo</th>\n",
       "      <th>tel</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>正义路东交民巷28号楼A座(首都宾馆北门)</td>\n",
       "      <td>东城区</td>\n",
       "      <td>62.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A7I1TH</td>\n",
       "      <td>...</td>\n",
       "      <td>静园川菜(东交民巷店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65244156</td>\n",
       "      <td>餐饮服务;中餐厅;四川菜(川菜)</td>\n",
       "      <td>050102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>正义路8号(市政府斜对面)</td>\n",
       "      <td>东城区</td>\n",
       "      <td>69.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A7ZDMP</td>\n",
       "      <td>...</td>\n",
       "      <td>北京隆和居美食城(正义路店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65263265</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>东交民巷44号</td>\n",
       "      <td>东城区</td>\n",
       "      <td>161.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A83BNF</td>\n",
       "      <td>...</td>\n",
       "      <td>全聚德烤鸭店(天安门店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65132855;010-65122265</td>\n",
       "      <td>餐饮服务;中餐厅;北京菜</td>\n",
       "      <td>050111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>南池子大街11号</td>\n",
       "      <td>东城区</td>\n",
       "      <td>152.00</td>\n",
       "      <td>0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFG9V1R9</td>\n",
       "      <td>...</td>\n",
       "      <td>四季民福烤鸭店(故宫店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "      <td>010-65267369;17570883520</td>\n",
       "      <td>餐饮服务;中餐厅;北京菜</td>\n",
       "      <td>050111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>前门东大街甲2号1-B1层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>44.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8WCAL</td>\n",
       "      <td>...</td>\n",
       "      <td>肯德基(前门东大街店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-67011950;010-67010282</td>\n",
       "      <td>餐饮服务;快餐厅;肯德基</td>\n",
       "      <td>050301</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>东交民巷44号院</td>\n",
       "      <td>东城区</td>\n",
       "      <td>138.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A804YB</td>\n",
       "      <td>...</td>\n",
       "      <td>东来顺(天安门店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65241042</td>\n",
       "      <td>餐饮服务;中餐厅;老字号</td>\n",
       "      <td>050116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>西长安街天安门广场西侧(天安门广场西)</td>\n",
       "      <td>西城区</td>\n",
       "      <td>650.00</td>\n",
       "      <td>0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8758C</td>\n",
       "      <td>...</td>\n",
       "      <td>人民大会堂宴会厅</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;中餐厅;综合酒楼</td>\n",
       "      <td>050101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>东打磨厂街7号新活馆1层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>201</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8UI43</td>\n",
       "      <td>...</td>\n",
       "      <td>麦当劳(祈年大街得来速店)</td>\n",
       "      <td>B0FFH14X68</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-67082846;010-67082346</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>王府井大街帅府园胡同9号</td>\n",
       "      <td>东城区</td>\n",
       "      <td>191.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A83BU7</td>\n",
       "      <td>...</td>\n",
       "      <td>全聚德烤鸭店(王府井店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65228384;010-65253310</td>\n",
       "      <td>餐饮服务;中餐厅;老字号|餐饮服务;中餐厅;北京菜</td>\n",
       "      <td>050116|050111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>前门东大街23号G单元美国使馆旧址东北角</td>\n",
       "      <td>东城区</td>\n",
       "      <td>209.00</td>\n",
       "      <td>0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000AA3YM8</td>\n",
       "      <td>...</td>\n",
       "      <td>花马天堂云南餐厅(前门东大街)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-85162698</td>\n",
       "      <td>餐饮服务;中餐厅;云贵菜</td>\n",
       "      <td>050114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>王府井东街8号澳门中心F4层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>915.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>201</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A9JLJ3</td>\n",
       "      <td>...</td>\n",
       "      <td>神洲四海海鲜大酒楼(澳门中心商场店)</td>\n",
       "      <td>B000A852XN</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-58138238;15210553549;15801202304</td>\n",
       "      <td>餐饮服务;中餐厅;海鲜酒楼</td>\n",
       "      <td>050119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>鲜鱼口街65-77号</td>\n",
       "      <td>东城区</td>\n",
       "      <td>120.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8ULHM</td>\n",
       "      <td>...</td>\n",
       "      <td>便宜坊(鲜鱼口店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "      <td>010-67132535;010-67132536</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>前门大街38号(大栅栏东口)</td>\n",
       "      <td>东城区</td>\n",
       "      <td>79.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A84FX4</td>\n",
       "      <td>...</td>\n",
       "      <td>都一处烧麦馆(前门店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-67024578;010-67021555</td>\n",
       "      <td>餐饮服务;中餐厅;老字号</td>\n",
       "      <td>050116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>太仆寺街21号</td>\n",
       "      <td>西城区</td>\n",
       "      <td>111.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFG09QK</td>\n",
       "      <td>...</td>\n",
       "      <td>局气(西单店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-68085088;18600006811</td>\n",
       "      <td>餐饮服务;中餐厅;北京菜</td>\n",
       "      <td>050111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>王府井大街138号新东安广场6层601</td>\n",
       "      <td>东城区</td>\n",
       "      <td>64.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>201</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8WXY0</td>\n",
       "      <td>...</td>\n",
       "      <td>外婆家(北京apm)</td>\n",
       "      <td>B000A842O2</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;中餐厅;浙江菜</td>\n",
       "      <td>050106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>王府井大街200号工美大厦1层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>28.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>202</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A84AQB</td>\n",
       "      <td>...</td>\n",
       "      <td>麦当劳(新王府井店)</td>\n",
       "      <td>B000A82ZZS</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-65120499</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>珠市口西大街83号</td>\n",
       "      <td>西城区</td>\n",
       "      <td>179.00</td>\n",
       "      <td>0</td>\n",
       "      <td>4.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>202</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A7CC6R</td>\n",
       "      <td>...</td>\n",
       "      <td>丰泽园(总店)</td>\n",
       "      <td>B0FFH12U1X</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "      <td>010-63032828;010-63186688</td>\n",
       "      <td>餐饮服务;中餐厅;山东菜(鲁菜)</td>\n",
       "      <td>050104</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>王府井大街88号银泰in88百货3层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>130.00</td>\n",
       "      <td>0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>diner</td>\n",
       "      <td>201</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A8VWES</td>\n",
       "      <td>...</td>\n",
       "      <td>海底捞火锅(王府井店)</td>\n",
       "      <td>B000A80P20</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>1</td>\n",
       "      <td>010-59785688;010-59785689</td>\n",
       "      <td>餐饮服务;中餐厅;火锅店</td>\n",
       "      <td>050117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>廊房二条56号</td>\n",
       "      <td>西城区</td>\n",
       "      <td>77.00</td>\n",
       "      <td>0</td>\n",
       "      <td>3.5</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A53D9E</td>\n",
       "      <td>...</td>\n",
       "      <td>爆肚冯(前门店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-63083296</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>东长安街33号北京饭店C座7层</td>\n",
       "      <td>东城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>312</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>B000A81JDJ</td>\n",
       "      <td>...</td>\n",
       "      <td>北京饭店谭家菜</td>\n",
       "      <td>B000A10FBB</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>北京市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>010-85009688;010-65137766</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  address adname biz_ext.cost biz_ext.meal_ordering  \\\n",
       "0   正义路东交民巷28号楼A座(首都宾馆北门)    东城区        62.00                     0   \n",
       "1           正义路8号(市政府斜对面)    东城区        69.00                     0   \n",
       "2                 东交民巷44号    东城区       161.00                     0   \n",
       "3                南池子大街11号    东城区       152.00                     0   \n",
       "4           前门东大街甲2号1-B1层    东城区        44.00                     0   \n",
       "5                东交民巷44号院    东城区       138.00                     0   \n",
       "6     西长安街天安门广场西侧(天安门广场西)    西城区       650.00                     0   \n",
       "7            东打磨厂街7号新活馆1层    东城区        30.00                     0   \n",
       "8            王府井大街帅府园胡同9号    东城区       191.00                     0   \n",
       "9    前门东大街23号G单元美国使馆旧址东北角    东城区       209.00                     0   \n",
       "10         王府井东街8号澳门中心F4层    东城区       915.00                     0   \n",
       "11             鲜鱼口街65-77号    东城区       120.00                     0   \n",
       "12         前门大街38号(大栅栏东口)    东城区        79.00                     0   \n",
       "13                太仆寺街21号    西城区       111.00                     0   \n",
       "14    王府井大街138号新东安广场6层601    东城区        64.00                     0   \n",
       "15        王府井大街200号工美大厦1层    东城区        28.00                     0   \n",
       "16              珠市口西大街83号    西城区       179.00                     0   \n",
       "17     王府井大街88号银泰in88百货3层    东城区       130.00                     0   \n",
       "18                廊房二条56号    西城区        77.00                     0   \n",
       "19        东长安街33号北京饭店C座7层    东城区           []                     0   \n",
       "\n",
       "   biz_ext.rating biz_type childtype cityname distance          id  ...  \\\n",
       "0             4.0    diner        []      北京市       []  B000A7I1TH  ...   \n",
       "1             3.5    diner        []      北京市       []  B000A7ZDMP  ...   \n",
       "2             4.0    diner        []      北京市       []  B000A83BNF  ...   \n",
       "3             5.0    diner        []      北京市       []  B0FFG9V1R9  ...   \n",
       "4             3.5    diner        []      北京市       []  B000A8WCAL  ...   \n",
       "5             3.0    diner        []      北京市       []  B000A804YB  ...   \n",
       "6             5.0    diner        []      北京市       []  B000A8758C  ...   \n",
       "7             4.0    diner       201      北京市       []  B000A8UI43  ...   \n",
       "8             3.5    diner        []      北京市       []  B000A83BU7  ...   \n",
       "9             5.0    diner        []      北京市       []  B000AA3YM8  ...   \n",
       "10            3.5    diner       201      北京市       []  B000A9JLJ3  ...   \n",
       "11            4.0    diner        []      北京市       []  B000A8ULHM  ...   \n",
       "12            3.5    diner        []      北京市       []  B000A84FX4  ...   \n",
       "13            4.5    diner        []      北京市       []  B0FFFG09QK  ...   \n",
       "14            4.0    diner       201      北京市       []  B000A8WXY0  ...   \n",
       "15            4.0    diner       202      北京市       []  B000A84AQB  ...   \n",
       "16            4.5    diner       202      北京市       []  B000A7CC6R  ...   \n",
       "17            5.0    diner       201      北京市       []  B000A8VWES  ...   \n",
       "18            3.5    diner        []      北京市       []  B000A53D9E  ...   \n",
       "19             []    diner       312      北京市       []  B000A81JDJ  ...   \n",
       "\n",
       "                  name      parent  \\\n",
       "0          静园川菜(东交民巷店)          []   \n",
       "1       北京隆和居美食城(正义路店)          []   \n",
       "2         全聚德烤鸭店(天安门店)          []   \n",
       "3         四季民福烤鸭店(故宫店)          []   \n",
       "4          肯德基(前门东大街店)          []   \n",
       "5            东来顺(天安门店)          []   \n",
       "6             人民大会堂宴会厅          []   \n",
       "7        麦当劳(祈年大街得来速店)  B0FFH14X68   \n",
       "8         全聚德烤鸭店(王府井店)          []   \n",
       "9      花马天堂云南餐厅(前门东大街)          []   \n",
       "10  神洲四海海鲜大酒楼(澳门中心商场店)  B000A852XN   \n",
       "11           便宜坊(鲜鱼口店)          []   \n",
       "12         都一处烧麦馆(前门店)          []   \n",
       "13             局气(西单店)          []   \n",
       "14          外婆家(北京apm)  B000A842O2   \n",
       "15          麦当劳(新王府井店)  B000A82ZZS   \n",
       "16             丰泽园(总店)  B0FFH12U1X   \n",
       "17         海底捞火锅(王府井店)  B000A80P20   \n",
       "18            爆肚冯(前门店)          []   \n",
       "19             北京饭店谭家菜  B000A10FBB   \n",
       "\n",
       "                                               photos pname poiweight shopid  \\\n",
       "0   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "1   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "2   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "3   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "4   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "5   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "6   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "7   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "8   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "9   [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "10  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "11  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "12  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "13  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "14  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "15  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "16  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "17  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "18  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "19  [{'url': 'http://store.is.autonavi.com/showpic...   北京市        []     []   \n",
       "\n",
       "   shopinfo                                   tel                       type  \\\n",
       "0         0                          010-65244156           餐饮服务;中餐厅;四川菜(川菜)   \n",
       "1         0                          010-65263265               餐饮服务;中餐厅;中餐厅   \n",
       "2         0             010-65132855;010-65122265               餐饮服务;中餐厅;北京菜   \n",
       "3         1              010-65267369;17570883520               餐饮服务;中餐厅;北京菜   \n",
       "4         0             010-67011950;010-67010282               餐饮服务;快餐厅;肯德基   \n",
       "5         0                          010-65241042               餐饮服务;中餐厅;老字号   \n",
       "6         0                                    []              餐饮服务;中餐厅;综合酒楼   \n",
       "7         0             010-67082846;010-67082346               餐饮服务;快餐厅;麦当劳   \n",
       "8         0             010-65228384;010-65253310  餐饮服务;中餐厅;老字号|餐饮服务;中餐厅;北京菜   \n",
       "9         0                          010-85162698               餐饮服务;中餐厅;云贵菜   \n",
       "10        0  010-58138238;15210553549;15801202304              餐饮服务;中餐厅;海鲜酒楼   \n",
       "11        1             010-67132535;010-67132536               餐饮服务;中餐厅;中餐厅   \n",
       "12        0             010-67024578;010-67021555               餐饮服务;中餐厅;老字号   \n",
       "13        0              010-68085088;18600006811               餐饮服务;中餐厅;北京菜   \n",
       "14        0                                    []               餐饮服务;中餐厅;浙江菜   \n",
       "15        0                          010-65120499               餐饮服务;快餐厅;麦当劳   \n",
       "16        1             010-63032828;010-63186688           餐饮服务;中餐厅;山东菜(鲁菜)   \n",
       "17        1             010-59785688;010-59785689               餐饮服务;中餐厅;火锅店   \n",
       "18        0                          010-63083296               餐饮服务;中餐厅;中餐厅   \n",
       "19        0             010-85009688;010-65137766               餐饮服务;中餐厅;中餐厅   \n",
       "\n",
       "         typecode  \n",
       "0          050102  \n",
       "1          050100  \n",
       "2          050111  \n",
       "3          050111  \n",
       "4          050301  \n",
       "5          050116  \n",
       "6          050101  \n",
       "7          050302  \n",
       "8   050116|050111  \n",
       "9          050114  \n",
       "10         050119  \n",
       "11         050100  \n",
       "12         050116  \n",
       "13         050111  \n",
       "14         050106  \n",
       "15         050302  \n",
       "16         050104  \n",
       "17         050117  \n",
       "18         050100  \n",
       "19         050100  \n",
       "\n",
       "[20 rows x 22 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df_北京_美食 = pd.io.json.json_normalize(北京_美食[\"pois\"])\n",
    "display(df_北京_美食)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 周边搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "def place_around(location,keywords=None,types=None,city=None,redius=None,sortrule=None,offset=None,page=None,extensions='base',sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/place/around?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'keywords':keywords,\n",
    "        'location':location,\n",
    "        'types':types,\n",
    "        'city':city,\n",
    "        'redius':redius,\n",
    "        'sortrule':sortrule,\n",
    "        'offset':offset,\n",
    "        'page':page,\n",
    "        'extensions':extensions,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '884',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'pois': [{'id': 'B0FFKPX8WR',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '云落手工粿条',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '湖滨东路东150米',\n",
       "   'location': '116.142211,23.440834',\n",
       "   'tel': [],\n",
       "   'distance': '36',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFGZKQWR',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '麦香雅面包店',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '棉湖镇云波路中段46号',\n",
       "   'location': '116.142502,23.440498',\n",
       "   'tel': '18707688358',\n",
       "   'distance': '80',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFM3MI4U',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '丫丫美甲',\n",
       "   'type': '生活服务;美容美发店;美容美发店',\n",
       "   'typecode': '071100',\n",
       "   'biz_type': [],\n",
       "   'address': [],\n",
       "   'location': '116.142687,23.440318',\n",
       "   'tel': [],\n",
       "   'distance': '107',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFK8KFAS',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '中国福利彩票',\n",
       "   'type': '生活服务;彩票彩券销售点;彩票彩券销售点',\n",
       "   'typecode': '071800',\n",
       "   'biz_type': [],\n",
       "   'address': '道江中路西50米',\n",
       "   'location': '116.143555,23.440370',\n",
       "   'tel': [],\n",
       "   'distance': '183',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFFAMTL2',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '杰弟牛肉店',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': [],\n",
       "   'location': '116.140106,23.440615',\n",
       "   'tel': [],\n",
       "   'distance': '183',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFLI4IT0',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '蒸滋味阿生炒饭',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '道江路',\n",
       "   'location': '116.143588,23.440427',\n",
       "   'tel': [],\n",
       "   'distance': '184',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFM1FTUY',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '方厝寨老希茶店',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '棉湖镇方厝寨',\n",
       "   'location': '116.140678,23.439663',\n",
       "   'tel': '13682747937',\n",
       "   'distance': '187',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFKS42BY',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '嘉弟果蔬面汤店',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '棉湖镇云波路65号',\n",
       "   'location': '116.143667,23.440560',\n",
       "   'tel': '15889105507',\n",
       "   'distance': '187',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFMCYKX6',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '名剪工作室',\n",
       "   'type': '生活服务;美容美发店;美容美发店',\n",
       "   'typecode': '071100',\n",
       "   'biz_type': [],\n",
       "   'address': [],\n",
       "   'location': '116.141282,23.442569',\n",
       "   'tel': [],\n",
       "   'distance': '191',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFFR4TLQ',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '肥记烧腊店',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '棉湖镇道江路452号新湖东寨门对面',\n",
       "   'location': '116.143726,23.440660',\n",
       "   'tel': '13682816202',\n",
       "   'distance': '191',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFL10G4F',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '小何麻辣烫',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '道江路',\n",
       "   'location': '116.143666,23.440382',\n",
       "   'tel': [],\n",
       "   'distance': '193',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFI9L1QP',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '埔田鲜竹叶蒸笼饭(棉湖分店)',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '兴中路k209号',\n",
       "   'location': '116.143780,23.440754',\n",
       "   'tel': '13729341357;17875967110',\n",
       "   'distance': '195',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFHQ34SV',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '重庆胖子砂锅麻辣烫(棉湖店)',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'typecode': '050118',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '兴中社区道江路458',\n",
       "   'location': '116.143829,23.440836',\n",
       "   'tel': '17347651516;17818827718',\n",
       "   'distance': '200',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFIS3SDZ',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '手机维修服务',\n",
       "   'type': '生活服务;维修站点;维修站点',\n",
       "   'typecode': '071200',\n",
       "   'biz_type': [],\n",
       "   'address': '棉湖镇道江路402号周星福珠宝正对面',\n",
       "   'location': '116.143798,23.440576',\n",
       "   'tel': [],\n",
       "   'distance': '200',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFHLFK04',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '深井泵服务部',\n",
       "   'type': '生活服务;生活服务场所;生活服务场所',\n",
       "   'typecode': '070000',\n",
       "   'biz_type': [],\n",
       "   'address': '兴中路k209号附近',\n",
       "   'location': '116.143840,23.440854',\n",
       "   'tel': [],\n",
       "   'distance': '201',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFJL0J03',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '堤慕',\n",
       "   'type': '餐饮服务;冷饮店;冷饮店',\n",
       "   'typecode': '050700',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '棉湖镇道江路458号',\n",
       "   'location': '116.143855,23.440882',\n",
       "   'tel': '17875961691',\n",
       "   'distance': '202',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFLI4NRV',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '新兴手机',\n",
       "   'type': '生活服务;维修站点;维修站点',\n",
       "   'typecode': '071200',\n",
       "   'biz_type': [],\n",
       "   'address': '棉湖镇道江路湖东方向良康医药对面',\n",
       "   'location': '116.143218,23.439596',\n",
       "   'tel': [],\n",
       "   'distance': '202',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFGAVTO3',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '老尾牛肉店',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '湖东路与解放路交叉口东南50米',\n",
       "   'location': '116.141105,23.442635',\n",
       "   'tel': '13695100895',\n",
       "   'distance': '204',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFF4F89Z',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '创艺剪烫造型',\n",
       "   'type': '生活服务;生活服务场所;生活服务场所',\n",
       "   'typecode': '070000',\n",
       "   'biz_type': [],\n",
       "   'address': '道江中路392-394号附近',\n",
       "   'location': '116.143194,23.439553',\n",
       "   'tel': '13246904023',\n",
       "   'distance': '204',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []},\n",
       "  {'id': 'B0FFHHGBS6',\n",
       "   'parent': [],\n",
       "   'childtype': [],\n",
       "   'name': '无牙白粥',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'biz_type': 'diner',\n",
       "   'address': '兴中路k209号附近',\n",
       "   'location': '116.143883,23.440928',\n",
       "   'tel': [],\n",
       "   'distance': '205',\n",
       "   'biz_ext': [],\n",
       "   'importance': [],\n",
       "   'shopid': [],\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'photos': []}]}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "湖滨_周边POI = place_around(湖滨居委会_location)\n",
    "湖滨_周边POI"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>address</th>\n",
       "      <th>biz_ext</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>childtype</th>\n",
       "      <th>distance</th>\n",
       "      <th>id</th>\n",
       "      <th>importance</th>\n",
       "      <th>location</th>\n",
       "      <th>name</th>\n",
       "      <th>parent</th>\n",
       "      <th>photos</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>shopid</th>\n",
       "      <th>shopinfo</th>\n",
       "      <th>tel</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>湖滨东路东150米</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>36</td>\n",
       "      <td>B0FFKPX8WR</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.142211,23.440834</td>\n",
       "      <td>云落手工粿条</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>棉湖镇云波路中段46号</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>80</td>\n",
       "      <td>B0FFGZKQWR</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.142502,23.440498</td>\n",
       "      <td>麦香雅面包店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>18707688358</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>107</td>\n",
       "      <td>B0FFM3MI4U</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.142687,23.440318</td>\n",
       "      <td>丫丫美甲</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;美容美发店;美容美发店</td>\n",
       "      <td>071100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>道江中路西50米</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>183</td>\n",
       "      <td>B0FFK8KFAS</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143555,23.440370</td>\n",
       "      <td>中国福利彩票</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;彩票彩券销售点;彩票彩券销售点</td>\n",
       "      <td>071800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>183</td>\n",
       "      <td>B0FFFAMTL2</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.140106,23.440615</td>\n",
       "      <td>杰弟牛肉店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>道江路</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>184</td>\n",
       "      <td>B0FFLI4IT0</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143588,23.440427</td>\n",
       "      <td>蒸滋味阿生炒饭</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>棉湖镇方厝寨</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>187</td>\n",
       "      <td>B0FFM1FTUY</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.140678,23.439663</td>\n",
       "      <td>方厝寨老希茶店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>13682747937</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>棉湖镇云波路65号</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>187</td>\n",
       "      <td>B0FFKS42BY</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143667,23.440560</td>\n",
       "      <td>嘉弟果蔬面汤店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>15889105507</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>191</td>\n",
       "      <td>B0FFMCYKX6</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.141282,23.442569</td>\n",
       "      <td>名剪工作室</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;美容美发店;美容美发店</td>\n",
       "      <td>071100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>棉湖镇道江路452号新湖东寨门对面</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>191</td>\n",
       "      <td>B0FFFR4TLQ</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143726,23.440660</td>\n",
       "      <td>肥记烧腊店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>13682816202</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>道江路</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>193</td>\n",
       "      <td>B0FFL10G4F</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143666,23.440382</td>\n",
       "      <td>小何麻辣烫</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>兴中路k209号</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>195</td>\n",
       "      <td>B0FFI9L1QP</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143780,23.440754</td>\n",
       "      <td>埔田鲜竹叶蒸笼饭(棉湖分店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>13729341357;17875967110</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>兴中社区道江路458</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>200</td>\n",
       "      <td>B0FFHQ34SV</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143829,23.440836</td>\n",
       "      <td>重庆胖子砂锅麻辣烫(棉湖店)</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>17347651516;17818827718</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>棉湖镇道江路402号周星福珠宝正对面</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>200</td>\n",
       "      <td>B0FFIS3SDZ</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143798,23.440576</td>\n",
       "      <td>手机维修服务</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;维修站点;维修站点</td>\n",
       "      <td>071200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>兴中路k209号附近</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>201</td>\n",
       "      <td>B0FFHLFK04</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143840,23.440854</td>\n",
       "      <td>深井泵服务部</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;生活服务场所;生活服务场所</td>\n",
       "      <td>070000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>棉湖镇道江路458号</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>202</td>\n",
       "      <td>B0FFJL0J03</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143855,23.440882</td>\n",
       "      <td>堤慕</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>17875961691</td>\n",
       "      <td>餐饮服务;冷饮店;冷饮店</td>\n",
       "      <td>050700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>棉湖镇道江路湖东方向良康医药对面</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>202</td>\n",
       "      <td>B0FFLI4NRV</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143218,23.439596</td>\n",
       "      <td>新兴手机</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>生活服务;维修站点;维修站点</td>\n",
       "      <td>071200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>湖东路与解放路交叉口东南50米</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>204</td>\n",
       "      <td>B0FFGAVTO3</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.141105,23.442635</td>\n",
       "      <td>老尾牛肉店</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>13695100895</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>道江中路392-394号附近</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>204</td>\n",
       "      <td>B0FFF4F89Z</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143194,23.439553</td>\n",
       "      <td>创艺剪烫造型</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>13246904023</td>\n",
       "      <td>生活服务;生活服务场所;生活服务场所</td>\n",
       "      <td>070000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>兴中路k209号附近</td>\n",
       "      <td>[]</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>205</td>\n",
       "      <td>B0FFHHGBS6</td>\n",
       "      <td>[]</td>\n",
       "      <td>116.143883,23.440928</td>\n",
       "      <td>无牙白粥</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               address biz_ext biz_type childtype distance          id  \\\n",
       "0            湖滨东路东150米      []    diner        []       36  B0FFKPX8WR   \n",
       "1          棉湖镇云波路中段46号      []    diner        []       80  B0FFGZKQWR   \n",
       "2                   []      []       []        []      107  B0FFM3MI4U   \n",
       "3             道江中路西50米      []       []        []      183  B0FFK8KFAS   \n",
       "4                   []      []    diner        []      183  B0FFFAMTL2   \n",
       "5                  道江路      []    diner        []      184  B0FFLI4IT0   \n",
       "6               棉湖镇方厝寨      []    diner        []      187  B0FFM1FTUY   \n",
       "7            棉湖镇云波路65号      []    diner        []      187  B0FFKS42BY   \n",
       "8                   []      []       []        []      191  B0FFMCYKX6   \n",
       "9    棉湖镇道江路452号新湖东寨门对面      []    diner        []      191  B0FFFR4TLQ   \n",
       "10                 道江路      []    diner        []      193  B0FFL10G4F   \n",
       "11            兴中路k209号      []    diner        []      195  B0FFI9L1QP   \n",
       "12          兴中社区道江路458      []    diner        []      200  B0FFHQ34SV   \n",
       "13  棉湖镇道江路402号周星福珠宝正对面      []       []        []      200  B0FFIS3SDZ   \n",
       "14          兴中路k209号附近      []       []        []      201  B0FFHLFK04   \n",
       "15          棉湖镇道江路458号      []    diner        []      202  B0FFJL0J03   \n",
       "16    棉湖镇道江路湖东方向良康医药对面      []       []        []      202  B0FFLI4NRV   \n",
       "17     湖东路与解放路交叉口东南50米      []    diner        []      204  B0FFGAVTO3   \n",
       "18      道江中路392-394号附近      []       []        []      204  B0FFF4F89Z   \n",
       "19          兴中路k209号附近      []    diner        []      205  B0FFHHGBS6   \n",
       "\n",
       "   importance              location            name parent photos poiweight  \\\n",
       "0          []  116.142211,23.440834          云落手工粿条     []     []        []   \n",
       "1          []  116.142502,23.440498          麦香雅面包店     []     []        []   \n",
       "2          []  116.142687,23.440318            丫丫美甲     []     []        []   \n",
       "3          []  116.143555,23.440370          中国福利彩票     []     []        []   \n",
       "4          []  116.140106,23.440615           杰弟牛肉店     []     []        []   \n",
       "5          []  116.143588,23.440427         蒸滋味阿生炒饭     []     []        []   \n",
       "6          []  116.140678,23.439663         方厝寨老希茶店     []     []        []   \n",
       "7          []  116.143667,23.440560         嘉弟果蔬面汤店     []     []        []   \n",
       "8          []  116.141282,23.442569           名剪工作室     []     []        []   \n",
       "9          []  116.143726,23.440660           肥记烧腊店     []     []        []   \n",
       "10         []  116.143666,23.440382           小何麻辣烫     []     []        []   \n",
       "11         []  116.143780,23.440754  埔田鲜竹叶蒸笼饭(棉湖分店)     []     []        []   \n",
       "12         []  116.143829,23.440836  重庆胖子砂锅麻辣烫(棉湖店)     []     []        []   \n",
       "13         []  116.143798,23.440576          手机维修服务     []     []        []   \n",
       "14         []  116.143840,23.440854          深井泵服务部     []     []        []   \n",
       "15         []  116.143855,23.440882              堤慕     []     []        []   \n",
       "16         []  116.143218,23.439596            新兴手机     []     []        []   \n",
       "17         []  116.141105,23.442635           老尾牛肉店     []     []        []   \n",
       "18         []  116.143194,23.439553          创艺剪烫造型     []     []        []   \n",
       "19         []  116.143883,23.440928            无牙白粥     []     []        []   \n",
       "\n",
       "   shopid shopinfo                      tel                  type typecode  \n",
       "0      []        0                       []      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "1      []        0              18707688358      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "2      []        0                       []      生活服务;美容美发店;美容美发店   071100  \n",
       "3      []        0                       []  生活服务;彩票彩券销售点;彩票彩券销售点   071800  \n",
       "4      []        0                       []          餐饮服务;中餐厅;中餐厅   050100  \n",
       "5      []        0                       []          餐饮服务;中餐厅;中餐厅   050100  \n",
       "6      []        0              13682747937      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "7      []        0              15889105507      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "8      []        0                       []      生活服务;美容美发店;美容美发店   071100  \n",
       "9      []        0              13682816202      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "10     []        0                       []          餐饮服务;快餐厅;快餐厅   050300  \n",
       "11     []        0  13729341357;17875967110      餐饮服务;餐饮相关场所;餐饮相关   050000  \n",
       "12     []        0  17347651516;17818827718    餐饮服务;中餐厅;特色/地方风味餐厅   050118  \n",
       "13     []        0                       []        生活服务;维修站点;维修站点   071200  \n",
       "14     []        0                       []    生活服务;生活服务场所;生活服务场所   070000  \n",
       "15     []        0              17875961691          餐饮服务;冷饮店;冷饮店   050700  \n",
       "16     []        0                       []        生活服务;维修站点;维修站点   071200  \n",
       "17     []        0              13695100895          餐饮服务;中餐厅;中餐厅   050100  \n",
       "18     []        0              13246904023    生活服务;生活服务场所;生活服务场所   070000  \n",
       "19     []        0                       []          餐饮服务;中餐厅;中餐厅   050100  "
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_湖滨_周边POI = pd.io.json.json_normalize(湖滨_周边POI['pois'])\n",
    "df_湖滨_周边POI"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## IP定位\n",
    "1. 能够将IP信息转换为地理位置信息。\n",
    "2. 适用于人工智能运用于各类软件登陆与注册，可以通过IP定位识别到不同的IP处在两个短时间无法移动到的地点，先后有过登陆账号的行为，从而判断出账号丢失的可能，及时发邮件提醒用户修改密码。可以防止账号丢失。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip:str):\n",
    "    \"\"\"IP定位可以帮你定位ip的所在位置，输入对应ip即可\"\"\"\n",
    "    parameters = {\n",
    "        'key':key_hong,\n",
    "        'ip':ip,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/ip?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    del data['status']\n",
    "    del data['info']\n",
    "    df = [\"省份：%s\"%(data['province']),\"地区：%s\"%(data['city']),\"地理编码：%s\"%(data['adcode']),\"经纬度： %s\"%(data['rectangle'])]\n",
    "    print(\"ip:\"+ip)\n",
    "    for i in df:\n",
    "        print(i)\n",
    "    return    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ip:183.132.146.163\n",
      "省份：浙江省\n",
      "地区：宁波市\n",
      "地理编码：330200\n",
      "经纬度： 121.3173974,29.67340916;121.8125439,30.06811904\n"
     ]
    }
   ],
   "source": [
    "ip(\"183.132.146.163\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 静态地图\n",
    "\n",
    "1. 用户能够将高德地图以图片形式嵌入自己的网页中。用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形\n",
    "\n",
    "2. 为方便用户浏览，适当添加地图的图片可以让用户体验升级"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "from io import BytesIO\n",
    "def staticmap(location,zoom,size=None,scale=1,markers=None,labels=None,paths=None,traffic=0,page=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/staticmap?parameters'\n",
    "    params={\n",
    "        'key':key_hong,\n",
    "        'location':location,\n",
    "        'zoom':zoom,\n",
    "        'size':size,\n",
    "        'scale':scale,\n",
    "        'markers':markers,\n",
    "        'labels':labels,\n",
    "        'paths':paths,\n",
    "        'traffic':traffic,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = Image.open(BytesIO(response.content))\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAADAFBMVEX++/zg3NL39PH+/vz7+P7s4sze29H9/fv18/D49O/7+/j++f7d2dXt8vX19e/09O/u8Pv69e7q7+/f6O3c5uv8+un58unj3tYFf+i+tqv9/Prf29Tw7uzd18719/n8+/jd2c5kpcpuo5zv6uHz8/IsjOTy7+v9/Pvq5Nv39Ozg29Dw7urj39fo5NzY5/nj3tXm4tjb4+Ws0P3i3dP7+/zc2NDR4evc2c/e6u/c2dPt6uT4+PjFbwDx9ff5+fjw8vCex/ju8O7c2tGQk5YHkPzi3dP39fTu7enu9Pbc18319PFPZn9pa237+fT6+vn39/Tl7vCYinnk4Nfb3trf2dDh7PHo5d/a5Ofj7fHs6uS6trH5+vv29/eusbTR2Nza4uP5+Pd8d3Ht6N/D2/j4+vvM4fjb5emv0vzg3NO51/z8+vjm49zr6eS5sKXa4eHy9/lrbnLm4dn7+vb49/bl3dHz8u54g4/3+fnm4tuLionGwbjz8OzD2OfEx8vo5+T28+zs0qyxfDfh3tegqonUmUibnaCekoLg2tChp66tr4zl4Njy7+jp8PP29PPi4Nu+ubLn49nh6+9jpcrh4+Lt6uanyeP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/r3wRASmCX9UFtPejBgNnAX56t611uvAAMon52bXxW7fwLtReQYtzdIm4WDeTP/2+Q19cUj7dkb/z5zwBIwvJjSbDHStq1HHRSq3clHdu1bNeyJ9BCHq5elnzswurZx5K3QSWQQGA7P3lSW1KCrAT8sq22+BlpIZDBx7AH++DNehLIk9ojE5cnAeNIVT5Mqv2xqjYJKt/dDeJuUUAOAZ+3MpHk8VEx/OUXAGRHTP3s3t7Z9Uk7Vq58ODG5PmlqcsLDdStjQA+WsHrqroTVy5N3JUNkCQ8RkA/Q6A1QPAHNDRoe/gBHjiO1TygggAJtIdCC3qyfmVobnWSMrzc2IR4XZru7QdwtCsiw69evV1b+9PGbEEgl+OV6BAAyf1cy1LKHMetWPvzn7GUPly/fteOfvfUXdiXX79ixPGn1MvBtx45tsx/GkG5vMeiU6us/AF9qP34ChnXoSR0BQ/WbiEEJ/POzj8lfIB7gd9XXJv+t9kJtPHU5D4fcXhLIX/fuHVZZ+XFS5bG3PvpoV358fDwcQxLWkZP1XSufrEtYvXJdwrFjK1eu3pUAxpFdx44dS3gG/rIL6Nix1f8fOQ95ArsrMKCXgNnIx8XUdBD+gvSk5AiwEd70Edz2+cr8Jngp/we6Wc3ubhB3ixlD/rwJTAxfmThqWPFbH0DZH8v6oF5ssr7tTZE/koGu6g1Vbm4NDxAd7R39dB4A8r9Hj3hly0TEwwHR3g9Eml78j0OBLkb0esjKefMqr1eqPjyn+n8aII+VtvDoN5bVp4YCXcYvVz5jVgzXTQwfdrAB6M8TV6925IqhBA3ujK7Rqz8HbeDkNXWpGrQ7G/QT15Et4NSsE5s0GHc2LFzHvH3PAzLoMrqKVn7OefP/P1RfYDMaLioqAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<PIL.PngImagePlugin.PngImageFile image mode=P size=400x400 at 0x16E98D5D080>"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "staticmap(location=揭阳一中_location,zoom=16)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 坐标转换\n",
    "1. 出于用户对高德地图的忠诚度，用户需要将非高德坐标转换为高德坐标。\n",
    "2. 这需要通过大量摄入外来非高德坐标数据，通过大数据完成机器学习，才能为用户提供这一服务。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "def assistant(locations:str,coordsys:str):\n",
    "    \"\"\"坐标转换\n",
    "    locations填入非高德坐标\n",
    "    coordsys可选值：gps,mapbar,baidu,autonavi（不进行转换）\n",
    "    \"\"\"\n",
    "    parameters = {\n",
    "        'key':key_hong,\n",
    "        'coordsys':coordsys,\n",
    "        'locations':locations,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\", params=parameters)\n",
    "    data = r.json()['locations']\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'116.487585177952,39.991754014757;116.487585177952,39.991653917101'"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "assistant(\"116.481499,39.990475|116.481499,39.990375\",'gps')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 天气查询\n",
    "1. 查询目标地点的天气状况，适用于用户出行提醒，路线规划提醒，作为加分项处于地图软件中\n",
    "2. 天气查询后台应该有大量天气数据做支撑，可以识别地点，预报天气\n",
    "3. 加入人工智能的语音提醒，可以为用户提供相对完美的天气播报"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weather(city:str):\n",
    "    \"\"\"天气查询\n",
    "    查询当地天气情况\"\"\"\n",
    "    parameters = {\n",
    "        'key':key_hong,\n",
    "        'city':city,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/weather/weatherInfo?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    \n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'lives': [{'province': '广东',\n",
       "   'city': '深圳市',\n",
       "   'adcode': '440300',\n",
       "   'weather': '阴',\n",
       "   'temperature': '19',\n",
       "   'winddirection': '北',\n",
       "   'windpower': '≤3',\n",
       "   'humidity': '100',\n",
       "   'reporttime': '2020-04-23 10:22:35'}]}"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weather('深圳')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 输入提示\n",
    "1. 根据用户输入的关键词查询返回建议列表。\n",
    "2. 与关键字搜索类似，基于大数据之上的机器学习，智能返回结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "def inputtips(keywords:str):\n",
    "    \"\"\"填写关键词课查询\"\"\"\n",
    "    parameters = {\n",
    "        'key':key_hong,\n",
    "        'keywords':keywords,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/assistant/inputtips?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': 'B0FFFDS13A',\n",
       "   'name': '湖滨',\n",
       "   'district': '浙江省杭州市上城区',\n",
       "   'adcode': '330102',\n",
       "   'location': '120.164471,30.252148',\n",
       "   'address': [],\n",
       "   'typecode': '190700',\n",
       "   'city': []},\n",
       "  {'id': 'B02F37VDY9',\n",
       "   'name': '湖滨阁',\n",
       "   'district': '广东省深圳市罗湖区',\n",
       "   'adcode': '440303',\n",
       "   'location': '114.138532,22.558286',\n",
       "   'address': '黄贝岭怡景路',\n",
       "   'typecode': '120302',\n",
       "   'city': []},\n",
       "  {'id': 'B018E0NFK1',\n",
       "   'name': '湖滨区',\n",
       "   'district': '河南省三门峡市湖滨区',\n",
       "   'adcode': '411202',\n",
       "   'location': '111.188737,34.771361',\n",
       "   'address': [],\n",
       "   'typecode': '190105',\n",
       "   'city': []},\n",
       "  {'id': 'B00190841H',\n",
       "   'name': '湖滨公寓',\n",
       "   'district': '江苏省南京市江宁区',\n",
       "   'adcode': '320115',\n",
       "   'location': '118.815015,31.943324',\n",
       "   'address': '胜太路88号',\n",
       "   'typecode': '120302',\n",
       "   'city': []},\n",
       "  {'id': 'B01FE0JS4C',\n",
       "   'name': '湖滨饭店',\n",
       "   'district': '江苏省无锡市宜兴市',\n",
       "   'adcode': '320282',\n",
       "   'location': '119.978678,31.396234',\n",
       "   'address': '周铁镇徐渎村',\n",
       "   'typecode': '050101',\n",
       "   'city': []},\n",
       "  {'id': 'B0250007B9',\n",
       "   'name': '厦门大学附属中山医院',\n",
       "   'district': '福建省厦门市思明区',\n",
       "   'adcode': '350203',\n",
       "   'location': '118.097616,24.471508',\n",
       "   'address': '湖滨南路201号',\n",
       "   'typecode': '090101',\n",
       "   'city': []},\n",
       "  {'id': 'B02000JPBT',\n",
       "   'name': '湖滨国际',\n",
       "   'district': '江苏省苏州市张家港市',\n",
       "   'adcode': '320582',\n",
       "   'location': '120.546673,31.843435',\n",
       "   'address': '湖南路与金港大道交叉口东150米',\n",
       "   'typecode': '120302',\n",
       "   'city': []},\n",
       "  {'id': 'B023B08RT2',\n",
       "   'name': '杭州湖滨银泰in77A区',\n",
       "   'district': '浙江省杭州市上城区',\n",
       "   'adcode': '330102',\n",
       "   'location': '120.162484,30.25316',\n",
       "   'address': '东坡路7号',\n",
       "   'typecode': '060101',\n",
       "   'city': []},\n",
       "  {'id': 'B01640MOM6',\n",
       "   'name': '湖滨1号',\n",
       "   'district': '山西省晋城市城区',\n",
       "   'adcode': '140502',\n",
       "   'location': '112.882131,35.497188',\n",
       "   'address': '红星东街开发区政府斜对角(红星东街与兰花路交口)',\n",
       "   'typecode': '050100',\n",
       "   'city': []},\n",
       "  {'id': 'B02F601KW4',\n",
       "   'name': '湖滨沐足',\n",
       "   'district': '广东省肇庆市端州区',\n",
       "   'adcode': '441202',\n",
       "   'location': '112.470023,23.053586',\n",
       "   'address': '天宁北路82号丙幢2层',\n",
       "   'typecode': '071400',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "inputtips(\"湖滨\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 交通态势\n",
    "1. 能够确定矩形、圆形或某条道路的交通态势情况，路况信息2分钟更新一次。\n",
    "2. 能够帮助人工智能规划更加合理的行车路线，是对机器学习做选择的一个功能优化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "def traffic_situation(rectangle:str):\n",
    "    \"\"\"rectangle:填写查询的经纬度\"\"\"\n",
    "    parameters = {\n",
    "        'key':key_hong,\n",
    "        'rectangle':rectangle,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/traffic/status/rectangle?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'trafficinfo': {'description': '北三环路：双向畅通。',\n",
       "  'evaluation': {'expedite': '100.00%',\n",
       "   'congested': '0.00%',\n",
       "   'blocked': '0.00%',\n",
       "   'unknown': '0.00%',\n",
       "   'status': '1',\n",
       "   'description': '整体畅通'}}}"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "traffic_situation(\"116.351147,39.966309;116.357134,39.968727\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 地理围栏\n",
    "1. 签到打卡类场景，在用户打卡操作前，判断用户是否已经在对应的地理围栏区域内；\n",
    "2. 共享单车类场景，当用户骑车离开合法使用区域时，第一时间获知；或当用户关锁支付时，判断用户是否停在了合法区域内；\n",
    "3. 线下门店促销场景，当获取到用户定位在促销门店区域的附近时，向用户发送引导进入店铺的促销信息。\n",
    "4. 这是在共享经济发展下的一个新功能，通过小区域定位智能化管理共享产品，在未来可以用智能机器人代替交警贴罚单"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [],
   "source": [
    "def geofence(name,center,radius):\n",
    "    \"\"\"rectangle:填写查询的经纬度\"\"\"\n",
    "    parameters = {\n",
    "              \"name\": name,\n",
    "              \"center\": center,\n",
    "              \"radius\":radius,\n",
    "        }\n",
    "    r = requests.get (\"https://restapi.amap.com/v4/geofence/meta?key=ee65e7d3e692cbfb9b04687337b72a7d\", params=parameters)\n",
    "    data = r.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'page_no': 1, 'page_size': 20, 'rs_list': [], 'total_record': 0},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geofence(\"测试围栏名称\",\"115.672126,38.817129\",\"1000\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 轨迹纠编\n",
    "1. 用于将行车产生的轨迹坐标点匹配到道路上。\n",
    "2. 这一功能应该是高德内部的内部数据的自我优化，如果每个司机的行车轨迹都出现在一座山上，极少数情况下可能是交通状况，但是如果山上多次出现行车轨迹，就说明这里已经新建了道路，只是系统的数据还没有更新，这也是机器学习自我优化的一个表现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [],
   "source": [
    "def trajectory_correction(key,x,y,sp,ag,tm):\n",
    "    \"\"\"rectangle:填写查询的经纬度\"\"\"\n",
    "    parameters = {\n",
    "              \"key\":key_hong,\n",
    "              \"x\": x,\n",
    "              \"y\": y,\n",
    "              \"sp\": sp,\n",
    "              \"ag\": ag,\n",
    "              \"tm\": tm,\n",
    "        }\n",
    "    r = requests.get (\"https://restapi.amap.com/v4/grasproad/driving\",params=parameters)\n",
    "    data = r.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'errcode': 20003,\n",
       " 'errdetail': '未知错误，请联系高德地图开放平台技术支持',\n",
       " 'errmsg': 'UNKNOWN_ERROR'}"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "trajectory_correction(\"key_hong\",\"116.449429\",\"40.014844\",\"4\",\"110\",\"1478831753\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 产品设计\n",
    "\n",
    "#### 产品名称：小宝出行\n",
    "\n",
    "#### 用户人群：小学生，小学生家长\n",
    "\n",
    "#### 调用的高德API：\n",
    "\n",
    "1. IP定位 \n",
    "2. 路径规划\n",
    "3. 天气查询 \n",
    "\n",
    "#### 产品描述：\n",
    "* 自2015年全面开放二孩政策以来，新一波的婴幼儿数量增长，各类母婴产品相应而出，在出行方面也有相应的需求。放开二孩会出现很大的年龄差，孩子还没长大，父母就老了。这需要新一代的青年儿童更快的自立生长，出行便是一大问题。如何让年事已高的父母少操心，让儿童出行更安全，便是这款产品所致力的。\n",
    "\n",
    "#### 产品功能：\n",
    "1. 家长和儿童在各自的通讯设备上下载“小宝出行”APP，家长可选择在手机上，儿童可选择手机或智能手表，产品会有两款界面设计方便用户使用。\n",
    "2. 家长可以与儿童关联亲情账号，家长可以根据这个app随时得知儿童的位置，方便家长接送孩子，儿童也可以知道父母所在的位置，如果走散了可以及时找到父母\n",
    "3. “小宝出行”APP另外提供天气预报功能，在接送孩子前可以提前查询学校附近的天气，是否需要带伞，需不需要帮孩子多带件衣服，可以帮孩子准备什么适宜的食物，如夏天准备绿豆汤。儿童出行前查看目的地天气，方便家长在孩子的书包里准备些什么东西。\n",
    "4. 所有路径规划与查询都要以地图的形式出现，可视化的图片方便实地识别路况。\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "303.542px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
